import { useState, type ReactNode } from 'react'; import { useI18n } from '../lib/i18n'; import type { Confidence } from '../lib/types'; import { Alert, ConfidenceTag } from './ui'; function AccordionSection({ id, title, children, open, toggle }: { id: string; title: string; children: ReactNode; open: string; toggle: (id: string) => void }) { return ( <>

); } const CONFS: Confidence[] = ['verified', 'mapped', 'stale', 'inferred', 'user', 'none']; interface Props { snapshotDate: string; counts: Record; simulateOutage: boolean; onSimulate: (v: boolean) => void; onReset: () => void; resetDone: boolean; } export function AboutView({ snapshotDate, counts, simulateOutage, onSimulate, onReset, resetDone }: Props) { const { t, date } = useI18n(); const [open, setOpen] = useState('data'); const toggle = (id: string) => setOpen((cur) => (cur === id ? '' : id)); return (

{t('about.title')}

{t('about.intro')}

{t('banner.data', { date: date(snapshotDate) })} {Object.entries(counts).map(([k, v]) => `${k}: ${v}`).join(' ยท ')}

{t('about.data.body1')}

{t('about.data.body2')}

{t('about.data.body3')}

{t('about.legend')}

    {CONFS.map((c) => (
  • {t(`conf.${c}.help`)}
  • ))}

{t('about.missing.body')}

{t('about.arch.body')}

{t('about.refresh.body')}

{t('about.privacy.body')}

{t('about.a11y.body')}

{t('about.biz.body')}

{t('about.limits.body')}

{t('about.demo')}

onSimulate(e.target.checked)} aria-describedby="simulate-help" />

{t('about.simulate.help')}

{resetDone && {t('about.resetDone')}}

{t('about.attr')}

); }