import { Bell, BellOff } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import styles from './NotificationToggle.module.css'; /** * - `on`: notifications are enabled * - `off`: available, but not enabled (or permission not asked yet) * - `blocked`: the browser denied the permission */ export type NotificationToggleState = 'on' | 'off' | 'blocked'; export interface NotificationToggleProps { state: NotificationToggleState; onToggle: () => void; } export function NotificationToggle({ state, onToggle }: NotificationToggleProps) { const { t } = useTranslation(); const label = state === 'on' ? t('notifications.disable') : state === 'blocked' ? t('notifications.blocked') : t('notifications.enable'); return ( ); }