import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@/components/ui/alert-dialog"; interface ConfirmDialogProps { open: boolean; onOpenChange: (open: boolean) => void; title: string; description: string; confirmText?: string; cancelText?: string; onConfirm: () => void; variant?: "default" | "destructive"; loading?: boolean; } export function ConfirmDialog({ open, onOpenChange, title, description, confirmText = "Confirm", cancelText = "Cancel", onConfirm, variant = "default", loading = false, }: ConfirmDialogProps) { return ( {title} {description} {cancelText} { e.preventDefault(); onConfirm(); }} className={variant === "destructive" ? "bg-red-600 hover:bg-red-700 focus:ring-red-600" : ""} disabled={loading} > {loading ? "Processing..." : confirmText} ); }