import React, { FC, ReactNode } from 'react'; import { SingleOptionProps } from './Option'; import { UseArrowNavProps } from '../../hooks/useArrowNav'; export interface OptionListProps extends FlatGroupProps { arrowNavOptions?: UseArrowNavProps; children?(optionProps: SingleOptionProps): ReactNode; /** Adds one or more classnames for an element */ className?: string; /** Holds values of options that are expanded or collapsed */ collapseValue?: SingleOptionProps['value'][]; /** Holds an indeterminate condition for option trees */ indeterminateValue?: SingleOptionProps['value'][]; /** Non-tree display of flat options with non-selectable group header */ flatGroup?: FlatGroupProps | boolean; /** Helper value of what option, if any, is currently focused */ focusValue?: any; /** Adds one or more classnames to grouped options */ groupClassName?: string; /** Whether the Option List is single or multiselect */ multiple?: boolean; /** Called when the user changes the value */ onChange?: (value: SingleOptionProps['value'], checked: boolean, childObject: SingleOptionProps, selfObject: SingleOptionProps) => void; /** Calls when the expand/collapse button is clicked */ onExpand?: (value: SingleOptionProps['value']) => void; /** Adds one or more classnames to each individual option */ optionClassName?: string; /** Detects key event and provides option that was focused */ optionOnKeyDown?: (e: React.KeyboardEvent, selfObject: SingleOptionProps) => void; /** Array of all the options in the Option List */ options?: SingleOptionProps[]; /** Value of selected options within the List */ value?: any; /** Callback to pass a list of options up to AnvilSelect */ getOptionsData?: (data: SingleOptionProps[]) => void; } interface FlatGroupProps { onGroupSelectAll?: (data: SingleOptionProps[]) => void; onGroupSelectNone?: (data: SingleOptionProps[]) => void; } export declare const OptionList: FC; export {};