import React from 'react'; import { Modal } from './Modal.tsx'; interface AlertDialogProps { isOpen: boolean; onClose: () => void; title?: string; message: string; type?: 'info' | 'warning' | 'error' | 'success'; confirmText?: string; } export const AlertDialog: React.FC = ({ isOpen, onClose, title, message, type = 'info', confirmText = 'OK' }) => { const getIcon = () => { switch (type) { case 'error': return '❌'; case 'warning': return '⚠️'; case 'success': return '✅'; default: return 'ℹ️'; } }; const getTitle = () => { if (title) return title; switch (type) { case 'error': return 'Error'; case 'warning': return 'Warning'; case 'success': return 'Success'; default: return 'Information'; } }; return (
{getIcon()}

{message}

); };