'use client'; import type { UserPreferences } from './types'; interface NotificationSettingsProps { preferences: UserPreferences; onChange: (updater: (prev: UserPreferences) => UserPreferences) => void; } export default function NotificationSettings({ preferences, onChange }: NotificationSettingsProps) { const items: { key: keyof UserPreferences['notifications']; title: string; desc: string }[] = [ { key: 'email', title: 'Email уведомления', desc: 'Получать уведомления на электронную почту' }, { key: 'push', title: 'Push уведомления', desc: 'Получать push-уведомления в браузере' }, { key: 'sound', title: 'Звуковые сигналы', desc: 'Воспроизводить звук для критических уведомлений' }, { key: 'criticalOnly', title: 'Только критические', desc: 'Показывать только критические уведомления' }, ]; return (

Настройки уведомлений

{items.map(({ key, title, desc }) => ( ))}
); }