import React from 'react'; import { useDemoStore } from '../../mock/store'; import { Drawer } from '../../shared/components/Drawer'; import { Button } from '../../shared/components/Button'; import { Bell, AlertTriangle, AlertCircle, CheckCircle2, Info, Check, Trash2 } from 'lucide-react'; import { useNavigate } from 'react-router-dom'; export const NotificationsDrawer: React.FC = () => { const { isNotificationsOpen, setIsNotificationsOpen, notifications, dismissNotification, markAllNotificationsRead, } = useDemoStore(); const navigate = useNavigate(); const getIcon = (type: string) => { switch (type) { case 'danger': return ; case 'warning': return ; case 'success': return ; default: return ; } }; return ( setIsNotificationsOpen(false)} title="Центр внимания и уведомлений" subtitle="Срочные алерты, статус кассы, стоп-листы и опоздания" width="md" footer={
} >
{notifications.length === 0 ? (
Нет активных уведомлений. Все системы в норме!
) : ( notifications.map((n) => (
{getIcon(n.type)}
{n.title}
{n.timestamp}

{n.message}

{n.actionUrl ? ( ) : ( )}
)) )}
); };