import "./switch.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; /** The kit's own, in both modes. */ export type SwitchState = { checked: boolean; disabled: boolean | undefined; }; export interface SwitchProps extends StyleProps { testID?: string; /** Required on an interactive switch outside a `FormField`, where its absence throws, since a nameless * toggle announces only its state. Inside a field the visible label names it; a read-only indicator * needs none. */ accessibilityLabel?: string; value?: boolean | null; disabled?: boolean; onChange?: (value: boolean) => void; ref?: React.Ref; /** {@link SwitchState}, not Base UI's, so the callback's argument keeps one shape whether or not * `onChange` is set. */ render?: useRender.RenderProp; } /** A boolean is a switch, not a two-option select, and it commits on flip, so only where nothing is saved. * Without `onChange` it is a read-only indicator with no role or tab stop, so it can sit inside * `SwitchRow`'s button. */ export declare function Switch({ testID, accessibilityLabel, value, disabled, onChange, render, ref, ...props }: SwitchProps): React.JSX.Element;