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";
switchOnly?: boolean;
}
export function NotificationSettings({
enabled,
onEnabledChange,
mode,
onModeChange,
permissionState,
switchOnly = false,
}: NotificationSettingsProps) {
if (permissionState === "unsupported") {
return null;
}
if (switchOnly) {
return (
<>
Notifications blocked by browser. Update in browser settings to enable.
)} {enabled && (