import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' interface ConfirmDialogProps { isOpen: boolean title: string message: React.ReactNode confirmLabel?: string cancelLabel?: string /** When true, the confirm button uses the destructive accent. */ destructive?: boolean onConfirm: () => void onClose: () => void } /** * Modal confirmation dialog. Built on the shadcn Dialog primitive: * Radix handles focus trap, portal, overlay-click dismissal, Esc, and * animations. We only supply title, body, and the two action buttons. */ export function ConfirmDialog({ isOpen, title, message, confirmLabel = 'Confirm', cancelLabel = 'Cancel', destructive = false, onConfirm, onClose, }: ConfirmDialogProps) { return ( !o && onClose()}> {title}
{message}
) }