"use client"; import { motion, AnimatePresence } from "framer-motion"; interface ConfirmDialogProps { isOpen: boolean; title: string; description: string; confirmText?: string; cancelText?: string; variant?: "danger" | "warning" | "default"; onConfirm: () => void; onCancel: () => void; } export default function ConfirmDialog({ isOpen, title, description, confirmText = "Confirm", cancelText = "Cancel", variant = "default", onConfirm, onCancel, }: ConfirmDialogProps) { const handleConfirm = () => { onConfirm(); onCancel(); // Close dialog }; const variantStyles = { danger: { button: "bg-red-600 hover:bg-red-700 text-white", icon: "text-red-600", bg: "bg-red-50", border: "border-red-200", }, warning: { button: "bg-yellow-600 hover:bg-yellow-700 text-white", icon: "text-yellow-600", bg: "bg-yellow-50", border: "border-yellow-200", }, default: { button: "bg-heat-100 hover:bg-heat-200 text-white", icon: "text-heat-100", bg: "bg-heat-4", border: "border-heat-100", }, }; const styles = variantStyles[variant]; return ( {isOpen && ( e.stopPropagation()} className="bg-accent-white rounded-16 shadow-2xl max-w-400 w-full" > {/* Content */}
{variant === "danger" ? ( ) : variant === "warning" ? ( ) : ( )}

{title}

{description}

{/* Actions */}
)}
); }