import * as React from 'react'; import { Trash2, AlertTriangle } from 'lucide-react'; import { Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from './dialog'; import { IconTile } from './icon-tile'; import { Button } from './button'; interface ConfirmDialogProps { open: boolean; onOpenChange: (open: boolean) => void; title: string; description?: React.ReactNode; confirmLabel?: string; cancelLabel?: string; icon?: React.ReactNode; tone?: 'destructive' | 'primary'; loading?: boolean; onConfirm: () => void | Promise; } export function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel = 'Delete', cancelLabel = 'Cancel', icon, tone = 'destructive', loading = false, onConfirm, }: ConfirmDialogProps) { const defaultIcon = tone === 'destructive' ? : ; return (
{title} {description && {description}}

This action cannot be undone.

); }