import * as React from 'react'; import { Palette } from '../types'; import { BoxProps } from '../Box'; import { FieldWrapperProps } from '../FieldWrapper'; export declare type LocalSwitchProps = { /** Automatically focus on the switch */ autoFocus?: boolean; checked?: boolean; inputProps?: React.InputHTMLAttributes; /** Is the switch checked by default? */ defaultChecked?: boolean; /** Disables the switch */ disabled?: boolean; /** Makes the switch required and sets aria-invalid to true */ isRequired?: boolean; /** Switch label */ label?: string; palette?: Palette; name?: string; /** State of the switch. Can be any color in the palette. */ state?: Palette; switchRef?: React.Ref; /** Initial value of the switch */ value?: boolean | string; /** Function to invoke when focus is lost */ onBlur?: React.FocusEventHandler; /** Function to invoke when switch has changed */ onChange?: React.FormEventHandler; /** Function to invoke when switch is focused */ onFocus?: React.FocusEventHandler; }; export declare type SwitchProps = Omit & LocalSwitchProps; export declare const Switch: React.ForwardRefExoticComponent & React.RefAttributes> & { displayName?: string; useProps: (props?: Partial, config?: { disableCSSProps?: string[]; themeKey?: string; }) => any; }; export declare type LocalSwitchFieldProps = { /** Label for the switch */ switchLabel?: string; /** Additional props for the Switch component */ switchProps?: SwitchProps; }; export declare type SwitchFieldProps = BoxProps & FieldWrapperProps & SwitchProps & LocalSwitchFieldProps; export declare const SwitchField: React.ForwardRefExoticComponent & React.RefAttributes> & { displayName?: string; useProps: (props?: Partial, config?: { disableCSSProps?: string[]; themeKey?: string; }) => any; };