import { type ReactNode } from "react"; import { type ColorTokens, type StyleProp, type ViewStyle } from "../../style/index.js"; export interface SwitchProps { /** Controlled on/off state; omit for uncontrolled use. */ checked?: boolean; /** Initial state for uncontrolled use (a bare is interactive). */ defaultChecked?: boolean; /** Fired with the next checked value when the switch is toggled (both modes). */ onChange?: (next: boolean) => void; /** Alias of onChange, for parity with RN's value-style callbacks. */ onValueChange?: (next: boolean) => void; /** E2E hook forwarded to the pressable row. */ testID?: string; small?: boolean; large?: boolean; disabled?: boolean; /** Optional label, rendered to the left of the track. */ children?: ReactNode; /** Optional muted description line, rendered under the label. */ description?: ReactNode; /** * Accessible name for the switch when no visible `children` label is rendered * (e.g. a switch embedded in an Action Panel whose label sits in sibling Text). * Without it, a label-less switch announces only "switch, on/off". */ accessibilityLabel?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } export type Size = "small" | "base" | "large"; export interface SwitchSkin { track: (tokens: ColorTokens, dark: boolean, checked: boolean, size: Size) => ViewStyle; thumb: (tokens: ColorTokens, checked: boolean, size: Size) => ViewStyle; } /** Build a Switch component from a platform skin. */ export declare function createSwitch(skin: SwitchSkin): (props: SwitchProps) => import("react").JSX.Element; //# sourceMappingURL=switch.shared.d.ts.map