import type { ReactNode } from 'react' export function SettingsFieldLabel(props: { children: ReactNode; hidden?: boolean; description?: string }) { if (props.hidden) return null if (!props.description) return
{props.children}
return (
{props.children}
{props.description}
) } export function ChevronRightIcon(props: { className?: string }) { return ( ) } export function ChevronDownIcon(props: { className?: string }) { return ( ) } export function CheckIcon(props: { className?: string }) { return ( ) } export function SettingsPageContent(props: { description?: string; children: ReactNode }) { return (
{props.description ?

{props.description}

: null}
{props.children}
) } export function SettingsSection(props: { title?: string; description?: string; children: ReactNode }) { return (
{props.title ?

{props.title}

: null} {props.description ?

{props.description}

: null}
{props.children}
) } export function SettingsRow(props: { label: string; description?: string; trailing?: ReactNode; children?: ReactNode }) { return (
{props.label}
{props.description ?
{props.description}
: null} {props.children}
{props.trailing ?
{props.trailing}
: null}
) } export function SettingsSwitch(props: { label: string; description?: string; checked: boolean; onChange: (checked: boolean) => void }) { return ( props.onChange(event.target.checked)} className="peer sr-only" aria-label={props.label} /> } /> ) } export function SettingsChoiceGroup(props: { label: string description?: string hideLabel?: boolean value: T options: ReadonlyArray<{ value: T; label: string; description?: string }> onChange: (value: T) => void columns?: 2 | 4 | 5 }) { const columns = props.columns === 5 ? 'grid-cols-5' : props.columns === 4 ? 'grid-cols-2 sm:grid-cols-4' : 'grid-cols-2' return (
{props.options.map((option) => { const selected = props.value === option.value return ( ) })}
) } export function SettingsLinkRow(props: { label: string; value?: string; description?: string; onClick: () => void }) { return ( ) }