import { default as React } from 'react'; import { FeedbackTextProps } from '../feedback-text/feedback-text'; export interface ToggleProps { /** * Unique identifier for the toggle input. * Required for accessibility and to link the label with the input. */ id: string; /** * Label text or element displayed next to the toggle. * This is shown to users and should clearly describe what the toggle does. */ label: React.ReactNode; /** * Visually hides the label while keeping it accessible to screen readers. * Useful when the toggle's purpose is clear from context (e.g., in a settings row). * @default false */ hideLabel?: boolean; /** * Position of the label relative to the toggle switch. * @default right */ labelPosition?: 'left' | 'right'; /** * Optional helper text displayed below the toggle. * Can be used to provide additional context or validation messages. */ helper?: FeedbackTextProps; /** * Additional CSS class name(s) to apply to the toggle wrapper. * Useful for custom styling or theming from parent components. */ className?: string; /** * Controlled state of the toggle. * Use this together with `onChange` for full control over the checked state. */ checked?: boolean; /** * Initial checked state for uncontrolled usage. * Ignored if `checked` prop is provided. */ defaultChecked?: boolean; /** * Callback fired when the toggle state changes. * @param value - The new checked state (`true` or `false`) */ onChange?(value: boolean): void; /** * Size of the toggle switch. * @default default */ size?: 'default' | 'large'; /** * Color variant of the toggle. * - `primary`: Standard toggle (usually blue/brand color) * - `colored`: Alternative accent color (e.g. for special settings) * @default primary */ color?: 'primary' | 'colored'; /** * Visual style variant of the toggle. * @default filled */ type?: 'filled' | 'outlined'; /** * Shows a lock icon inside the toggle knob. * Typically used with `size="large"` to indicate secure/private settings. * @default false */ icon?: boolean; /** * Disables the toggle, preventing user interaction. * @default false */ disabled?: boolean; /** * Shows a loading spinner inside the toggle instead of the icon or dot. * Useful for async operations (e.g. saving settings). * When `true`, `onChange` will not be triggered. * @default false */ isLoading?: boolean; /** * Tooltip content shown when hovering over the label. * Useful for providing extra explanation without cluttering the UI. */ tooltip?: string; } export declare const Toggle: React.ForwardRefExoticComponent>; export default Toggle;