export type SwitchConfig = { checked: () => boolean; onChange?: (checked: boolean) => void; disabled?: () => boolean; id?: () => string | undefined; invalid?: () => boolean; required?: () => boolean; error?: () => string | undefined; hint?: () => string | undefined; ariaLabel?: () => string | undefined; }; export type SwitchProps = { type: 'button'; role: 'switch'; id: string | undefined; 'aria-checked': boolean; 'aria-invalid': 'true' | undefined; 'aria-required': 'true' | undefined; 'aria-describedby': string | undefined; 'aria-label': string | undefined; disabled: boolean; 'data-checked': '' | undefined; onclick: () => void; onkeydown: (e: KeyboardEvent) => void; }; export type Switch = { /** Current on/off state. */ readonly checked: boolean; readonly disabled: boolean; /** Flip on/off (no-op when disabled). */ toggle: () => void; onKeydown: (e: KeyboardEvent) => void; /** Spread onto the switch element. */ switchProps: () => SwitchProps; }; export declare function createSwitch(config: SwitchConfig): Switch;