import React from 'react'; import PropTypes from 'prop-types'; export declare type SwitcherOptionIconPosition = 'left' | 'right'; export declare type SwitcherSize = 'l' | 'm' | 's' | 'xs'; export declare type SwitcherTheme = 'light' | 'dark'; export declare type SwitcherMode = 'rock' | 'classic'; export declare type SwitcherOption = { label?: React.ReactNode; value: OptionsValueType; /** Additional icon */ icon?: React.ReactNode; /** Optional a11y label for the option. May be useful for icon-only options. */ 'aria-label'?: string; }; export declare type SwitcherOptionForDocs = SwitcherOption; interface SwitcherExplicitProps { /** Current selected value */ value: ValueType; /** Array of options */ options?: SwitcherOption[]; onChange: (value: OptionsValueType) => void; className?: string; theme?: SwitcherTheme; size?: SwitcherSize; /** Appearance mode */ mode?: SwitcherMode; disabled?: boolean; /** Decrease horizontal paddings, gap and border-radius values */ compact?: boolean; /** Identifier for e2e tests */ 'data-e2e'?: string; /** **Works only if the `icon` on options is present.** Additional icon position. */ iconPosition?: SwitcherOptionIconPosition; /** CSS style object */ style?: React.CSSProperties; /** Optional a11y label for the switcher. Recommended to use either that or `aria-labelledby`. */ 'aria-label'?: string; /** Optional a11y label reference for the switcher. Recommended to use either that or `aria-label`. */ 'aria-labelledby'?: string; /** Optional name of all `input[type="radio"]` children. if not set, it will fallback to a randomly generated name. */ name?: string; } export declare type SwitcherProps = SwitcherExplicitProps & Omit, keyof SwitcherExplicitProps>; export declare function Switcher({ className, theme: themeFromProps, size, disabled, compact, options, value: switcherValue, mode, iconPosition, onChange, style, name, ...rest }: SwitcherProps): JSX.Element; export declare namespace Switcher { var propTypes: { options: PropTypes.Validator; value: PropTypes.Validator; icon: PropTypes.Requireable; }>[]>; onChange: PropTypes.Validator<(...args: any[]) => any>; value: PropTypes.Validator; className: PropTypes.Requireable; size: PropTypes.Requireable; theme: PropTypes.Requireable; disabled: PropTypes.Requireable; iconPosition: PropTypes.Requireable; 'data-e2e': PropTypes.Requireable; style: PropTypes.Requireable; }; } export default Switcher;