import React, { RefAttributes, FocusEvent, ChangeEvent, Ref } from 'react'; import { Box } from './Switcher.styles'; import { ResponsiveProp, Breakpoints } from '../Utils/responsiveness'; import { BoxStyled } from '../Utils/styled'; import { OnChangeHandler, Pretty } from '../Utils'; import { WithViewOnly } from '../ViewOnly'; export type Size = ResponsiveProp<'m' | 'l', B>; export type SwitcherEvent = (event: T, data: { name?: string; value: boolean; }) => void; export interface SwitcherProps extends Omit, 'ref' | 'onFocus' | 'onBlur' | 'onChange'>, WithViewOnly { /** Размеры */ size?: Size; /** Имя компонента (важно для группировки) */ name?: string; /** Состояние компонента */ checked?: boolean; /** Компонент неактивен если true */ disabled?: boolean; /** Обработчик события при потере фокуса компонентом */ onBlur?: SwitcherEvent>; /** Обработчик события при получении фокуса компонентом */ onFocus?: SwitcherEvent>; /** Обработчик события при клике на компонент */ onChange?: OnChangeHandler>; } declare const SwitcherInternal: (props: SwitcherProps, ref: Ref) => React.JSX.Element; export declare namespace Switcher { type OnChange = Pretty.Func>>; type OnBlur = Pretty.Func>>; type OnFocus = Pretty.Func>>; } export declare const Switcher: ((props: SwitcherProps & RefAttributes) => ReturnType) & { displayName?: string; }; export {};