import * as React from 'react';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
type ToggleSwitchProps = {
/**
* Label for the toggle switch.
*/
label?: React.ReactNode;
/**
* Passes properties for ToggleSwitch label.
*/
labelProps?: React.ComponentProps<'span'>;
/**
* Position of the label.
* @default 'right'
*/
labelPosition?: 'left' | 'right';
/**
* Passes props to wrapper.
*
* By default, `className` and `style` are applied on the wrapper element, and all other DOM props are passed to
* `` element.
*
* When `wrapperProps` is passed or when the `ToggleSwitch.consistentPropsSpread` future flag is enabled, `className`
* and `style` are applied on the `` element, similar to other DOM props.
*/
wrapperProps?: React.HTMLAttributes;
} & ({
/**
* Size of the toggle switch.
* @default 'default'
*/
size?: 'default';
/**
* Custom icon inside the toggle switch. Shown only when toggle is checked and size is not small.
*
* Will override the default checkmark icon.
*/
icon?: React.JSX.Element | null;
} | {
size: 'small';
icon?: never;
});
/**
* A switch for turning on and off.
*
* ---
*
* By default, `className` and `style` are applied on the wrapper element, and all other DOM props are passed to ``
* element.
*
* When `wrapperProps` is passed or when the `ToggleSwitch.consistentPropsSpread` future flag is enabled, `className`
* and `style` are applied on the `` element, similar to other DOM props.
*
* ---
*
* @example
*