import React, { FC } from 'react'; export interface SingleOptionPropStrict { /** Adds one or more classnames for an element */ className?: string; /** Whether child options are visible or not. */ collapsed?: boolean; /** Whether the option should have the expand/collapse button. */ collapseControl?: boolean; /** The default visualization of an option in the Popover of the Select */ content?: React.ReactNode | string; /** Indicates whether the option is disabled or not. It makes the option unselectable */ disabled?: boolean; /** Function to allow OptionList to set focus */ getFocus?: (value: any) => boolean; /** Indeterminate visual for a checkbox */ indeterminate?: boolean; /** Function to allow OptionList to set indeterminate */ getIndeterminate?: (value: any) => boolean; /** Provides tree-type styling to option, and ARIA label. Can be automatically calculated. */ level?: number; /** Visual that an option is loading. Used when child options need to be brought in on expand */ loading?: boolean; /** Calls when the option changes in value */ onChange?: (data: SingleOptionProps['value'], checked: boolean, childObject: SingleOptionProps[], selfObject: SingleOptionProps) => void; /** Calls when the expand/collapse button is clicked */ onExpand?: (data: SingleOptionProps['value']) => void; /** Grouping of options within options */ options?: SingleOptionProps[]; /** A secondary action a user can take on a single option */ secondaryAction?: React.ReactNode; /** Whether or not the option is selected */ selected?: boolean; /** Function to allow OptionList to set selected */ getSelected?: (value: any) => boolean; /** Prevents a user from selecting the option, without giving it the disabled styling/state */ readOnly?: boolean; /** Function to pass option data (value, DOM element) to OptionList */ registerOption?: (optionData: RegisterOptionData) => void; /** The default string of an option in the trigger of the Select */ text?: string; /** Value of the option, passed into Anvil's Checkbox value */ value?: any; } export interface SingleOptionProps extends SingleOptionPropStrict { /** Unstrict Props */ [propName: string]: any; } export interface RegisterOptionData { text?: SingleOptionProps['string']; value?: SingleOptionProps['value']; disabled?: SingleOptionProps['disabled']; element?: HTMLDivElement | null; } export declare const Option: FC;