import { ReactNode } from 'react' import { AlertTriangle, CheckCircle2, HelpCircle } from 'lucide-react' import { Modal } from './ui/Modal' import { Button } from './ui/Button' interface ConfirmDialogProps { isOpen: boolean onClose: () => void onConfirm: () => void title: string message: string // Zusatz unter der Meldung — z. B. ein Kasten mit der Größe der Rohdaten, // die beim Entfernen liegen bleiben, samt Wahl „mitlöschen". extra?: ReactNode confirmText?: string cancelText?: string type?: 'warning' | 'info' | 'success' } export default function ConfirmDialog({ isOpen, onClose, onConfirm, title, message, extra, confirmText = 'Bestätigen', cancelText = 'Abbrechen', type = 'info', }: ConfirmDialogProps) { const getIcon = () => { switch (type) { case 'warning': return case 'success': return default: return } } const getConfirmVariant = () => { switch (type) { case 'warning': return 'amber' case 'success': return 'primary' default: return 'primary' } } return (
{getIcon()}

{title}

{message}

{extra}
) }