"use client"; import * as React from "react"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { Loader, Send, AlertTriangle, CheckCircle } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { Progress } from "@/components/ui/progress"; // SEDP Send Confirmation Dialog export function SEDPConfirmationDialog({ isOpen, onClose, onConfirm, formName, tagCount, isLoading }: { isOpen: boolean; onClose: () => void; onConfirm: () => void; formName: string; tagCount: number; isLoading: boolean; }) { return ( Send Data to SEDP You are about to send form data to the Samsung Engineering Design Platform (SEDP).
Form Name:
{formName}
Total Tags:
{tagCount}
Data sent to SEDP cannot be easily reverted. Please ensure all information is correct before proceeding.
); } // SEDP Status Dialog - shows the result of the SEDP operation export function SEDPStatusDialog({ isOpen, onClose, status, message, successCount, errorCount, totalCount }: { isOpen: boolean; onClose: () => void; status: 'success' | 'error' | 'partial'; message: string; successCount: number; errorCount: number; totalCount: number; }) { // Calculate percentage for the progress bar const percentage = Math.round((successCount / totalCount) * 100); return ( {status === 'success' ? 'Data Sent Successfully' : status === 'partial' ? 'Partially Successful' : 'Failed to Send Data'}
{/* Status Icon */}
{status === 'success' ? (
) : status === 'partial' ? (
) : (
)}
{/* Message */}

{message}

{/* Progress Stats */}
Progress {percentage}%
{successCount} Successful
{errorCount > 0 && (
{errorCount} Failed
)}
); }