import { useEffect } from 'react' import { Card } from './ui' import type { Notification } from '@/lib/notificationService' import { NotificationItem } from './NotificationItem' import { NotificationPanelHeader } from './NotificationPanelHeader' import { t } from '@/lib/i18n' interface NotificationPanelProps { notifications: Notification[] unreadCount: number onNotificationClick: (notification: Notification) => void onDelete: (id: string) => void onMarkAllAsRead: () => void onClose: () => void } function NotificationList({ notifications, onNotificationClick, onDelete }: { notifications: Notification[] onNotificationClick: (notification: Notification) => void onDelete: (id: string) => void }): React.ReactElement { if (notifications.length === 0) { return (

{t('notification.empty')}

) } return (
{notifications.map((notification) => ( ))}
) } export function NotificationPanel({ notifications, unreadCount, onNotificationClick, onDelete, onMarkAllAsRead, onClose, }: NotificationPanelProps): React.ReactElement { useEffect(() => { const handleEscape = (e: KeyboardEvent): void => { if (e.key === 'Escape') { onClose() } } document.addEventListener('keydown', handleEscape) return () => { document.removeEventListener('keydown', handleEscape) } }, [onClose]) return ( <>
) }