import type { UseQueryResult } from '@tanstack/react-query' import type { LucideIcon } from 'lucide-react' import { Bell, Calendar, ChevronRight, Crosshair, Heart, House } from 'lucide-react' import { useId, type ReactNode } from 'react' import { Link } from 'react-router' import { Card } from '../ui/Card.tsx' import { ErrorBanner } from '../ui/ErrorBanner.tsx' import { Icon } from '../ui/Icon.tsx' import { Skeleton } from '../ui/Skeleton.tsx' import { Tag } from '../ui/Tag.tsx' import { useBreakpoint } from '../shell/useBreakpoint.ts' import { aiStatus, calendarStatus, formatClockTime, notificationsStatus, regularDinnersStatus, useAISettings, useCalendarStatus, useHouseholdSettings, useNotificationsStatus, useRegularDinnersCount, } from './api.ts' import styles from './SettingsPage.module.css' import { SettingsTabs } from './SettingsTabs.tsx' // Settings home: the list of settings pages on mobile (mock 1p), one page // with sub-tabs from 768 px (mock 2e). The sub-tabs stay mounted, hidden, on // mobile, so an unsaved draft survives the viewport crossing 768 px and its // leave guard keeps asking before the list navigates away. export function SettingsPage() { const mobile = useBreakpoint() === 'mobile' return ( <> {mobile && }