import { default as React } from 'react'; import { ReactSwitchProps } from 'react-switch'; import { ConfirmationItem } from '../Button/ButtonComponents/ConfirmationButton'; import { FormLabelProps } from '../FormLabel/FormLabel'; import { PopoverProps } from '../Popover/Popover'; type SwitchBaseProps = { /** Checked value of the Switch - boolean */ checked: ReactSwitchProps['checked']; /** Disabled state of the Switch - boolean */ disabled?: ReactSwitchProps['disabled']; /** Optional class for the Switch */ className?: string; /** Set as an attribute to the embedded checkbox. This is useful for the associated label, which can point to the id in its htmlFor attribute. */ customId?: ReactSwitchProps['id']; /** Optionally add a label for the Switch */ formLabelProps?: Omit; /** Optional prop to add a test id to the Switch for QA testing */ qaTestId?: string; }; type WithConfirmation = SwitchBaseProps & { /** Confirmation to appear when switching the Switch value */ confirmation: ConfirmationItem; /** Optional props for the Popover when using confirmation */ popoverProps?: PopoverProps; callout?: never; }; type WithoutConfirmation = SwitchBaseProps & { /** function to be executed when the checked status change */ callout: (checked: boolean) => void; confirmation?: never; popoverProps?: never; }; export type SwitchProps = WithConfirmation | WithoutConfirmation; declare const Switch: ({ checked, callout, className, customId, disabled, confirmation, popoverProps, formLabelProps, qaTestId, }: SwitchProps) => React.JSX.Element; export default Switch;