import { X, AlertCircle, Info, CheckCircle2, AlertTriangle } from 'lucide-react'; export type AlertType = 'error' | 'info' | 'success' | 'warning'; interface AlertModalProps { isOpen: boolean; onClose: () => void; title: string; message: string; type?: AlertType; } export default function AlertModal({ isOpen, onClose, title, message, type = 'error' }: AlertModalProps) { if (!isOpen) return null; const config = { error: { icon: AlertCircle, color: 'text-accent-rose', bg: 'bg-accent-rose/10', border: 'border-accent-rose/20', glow: 'shadow-[0_0_30px_rgba(244,63,94,0.3)]' }, warning: { icon: AlertTriangle, color: 'text-amber-500', bg: 'bg-amber-500/10', border: 'border-amber-500/20', glow: 'shadow-[0_0_30px_rgba(245,158,11,0.3)]' }, success: { icon: CheckCircle2, color: 'text-accent-cyan', bg: 'bg-accent-cyan/10', border: 'border-accent-cyan/20', glow: 'shadow-[0_0_30_rgba(6,182,212,0.3)]' }, info: { icon: Info, color: 'text-accent-indigo', bg: 'bg-accent-indigo/10', border: 'border-accent-indigo/20', glow: 'shadow-[0_0_30_rgba(99,102,241,0.3)]' } }; const { icon: StatusIcon, color, bg, border, glow } = config[type]; return (
{message}