"use client" import { Loader2 } from "lucide-react" import { cn } from "@/lib/utils" import { Modal } from "./modal" export interface ConfirmDialogProps { open: boolean onClose: () => void onConfirm: () => void title?: string message?: string confirmLabel?: string cancelLabel?: string variant?: "default" | "destructive" loading?: boolean children?: React.ReactNode } export function ConfirmDialog({ open, onClose, onConfirm, title = "Confirm", message, confirmLabel = "Confirm", cancelLabel = "Cancel", variant = "default", loading = false, children, }: ConfirmDialogProps) { return ( {} : onClose} title={title} size="sm" showCloseButton={!loading} >
{message && (

{message}

)} {children}
) }