import type { ReactNode } from "react"; /** Shared small form controls used by settings panels (Agent settings, * Subagent settings, ...). Extracted from AgentSettingsPanel.tsx so new * panels can reuse the same look without duplicating code. */ export function Card({ title, children }: { title: string; children: ReactNode }) { return (

{title}

{children}
); } export function Checkbox({ label, checked, disabled, onChange, }: { label: string; checked: boolean; disabled?: boolean; onChange: (checked: boolean) => void; }) { return ( ); } /** Pill-style toggle switch with a sliding knob. */ export function Toggle({ checked, disabled, onChange, ariaLabel, }: { checked: boolean; disabled?: boolean; onChange: (checked: boolean) => void; ariaLabel?: string; }) { return ( ); } export function NumberField({ label, value, onChange, }: { label: string; value?: number; onChange: (value: number | undefined) => void; }) { return ( ); } export function Segmented({ options, value, onChange, disabled, }: { options: { key: string; label: string; disabled?: boolean; title?: string }[]; value: string; onChange: (value: string) => void; disabled?: boolean; }) { return (
{options.map((opt) => { const optDisabled = disabled || opt.disabled === true; return ( // The title lives on the wrapper: a disabled button swallows pointer // events in Chromium, so its own tooltip would never show. ); })}
); }