import { Switch } from "~/components/ui/switch"; import { Label } from "~/components/ui/label"; import { RadioGroup, RadioGroupItem } from "~/components/ui/radio-group"; import type { NotificationMode } from "~/hooks/useDraftNotifications"; interface NotificationSettingsProps { enabled: boolean; onEnabledChange: (enabled: boolean) => void; mode: NotificationMode; onModeChange: (mode: NotificationMode) => void; permissionState: NotificationPermission | "unsupported"; } export function NotificationSettings({ enabled, onEnabledChange, mode, onModeChange, permissionState, }: NotificationSettingsProps) { if (permissionState === "unsupported") { return null; } return (
{permissionState === "denied" && (

Notifications blocked by browser. Update in browser settings to enable.

)} {enabled && ( onModeChange(value as NotificationMode)} className="space-y-2 mt-3" >
)}
); }