import type { ReactNode } from "react"; import Tooltip from "../Tooltip"; // Shared form/settings primitives, factored out of the many panels that each re-declared // them (Settings, Config, Stats, admin pages, Setup wizard). Visual contract unchanged. /** The standard text/select/number input style (full-width, surface bg, accent focus ring) — the * literal string was copy-pasted into DownloadCenter/DownloadDialog/ProfileEditor/ShareDialog/ * VideoEditor. NOTE: the settings-family panels (Settings/Config/Setup/Welcome) use a DIFFERENT * `bg-card rounded-xl focus:border-accent` style; unifying the two is a design call left to the * glass-consistency epic, not this DRY extract. */ export const inputCls = "w-full rounded-lg bg-surface border border-border px-3 py-2 text-sm focus:outline-hidden focus:ring-2 focus:ring-accent/40"; /** The standard text button style (used verbatim by ShareDialog + VideoEditor). */ export const btnCls = "px-3 py-1.5 rounded-lg text-sm font-medium transition disabled:opacity-50"; /** Pill on/off switch — the bare control; compose it with your own label/row. Pass `label` for * the accessible name (the visible row text) since the control itself has no inner text. */ export function Switch({ checked, onChange, label, disabled, }: { checked: boolean; onChange: (v: boolean) => void; label?: string; disabled?: boolean; }) { return ( ); } /** A titled settings block. Default = a plain block with an uppercase caption; `card` wraps it * in a glass card (the admin pages' style). */ export function Section({ title, card, children, }: { title: string; card?: boolean; children: ReactNode; }) { return (