import { type ComponentProps, type ReactNode } from "react"; import { Switch as SwitchPrimitive } from "radix-ui"; /** * - `brand` (default): the primary fill and edge when on, with a primary-ink * thumb; a solid switch-track when off, so the off state is visible in both * themes. * - `neutral`: foreground track when on. Quieter, for dense admin pages. */ export type SwitchVariant = "brand" | "neutral"; /** `md` is 36x20 for settings and sheets; `sm` is 28x16 for menus. Both have a 44px hit area. */ export type SwitchSize = "md" | "sm"; export interface SwitchProps extends Omit, "asChild" | "children"> { variant?: SwitchVariant | undefined; size?: SwitchSize | undefined; /** * Saving. Shows a spinner in the thumb and ignores clicks, but stays * focusable so keyboard focus isn't lost. Pass the new value as `checked`. */ pending?: boolean | undefined; /** * Why the switch is disabled and who can fix it. Only used with `disabled`: * the switch stays focusable (`aria-disabled`) and shows the reason in a * tooltip on hover, focus and tap. */ disabledReason?: ReactNode | undefined; /** Adds a small On or Off label before the switch, for dense rows. */ showStateText?: boolean | undefined; /** Overrides the On and Off words. */ stateLabels?: { on: ReactNode; off: ReactNode; }; } export declare function Switch({ variant, size, pending, disabled, disabledReason, showStateText, stateLabels, checked: checkedProp, defaultChecked, onCheckedChange, onClick, className, id: idProp, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledByProp, "aria-describedby": ariaDescribedByProp, ...props }: SwitchProps): import("react").JSX.Element;