import React from 'react'; import { CountedGroup, SelectAllItem } from '../../../utils/getGroups'; type IndexForHighlight = number | ((oldIndex: number) => number); type Group = { items: ITEM[]; key: string | number; group?: GROUP; }; type GetItemGroupKey = (item: ITEM) => string | number | undefined; type GetGroupKey = (item: GROUP) => string | number | undefined; type SortGroups = (a: Group, b: Group) => number; type OnChangeProp = (value: (MULTIPLE extends true ? ITEM[] : ITEM) | null, props: { e: React.SyntheticEvent; }) => void; type ValueProp = (MULTIPLE extends true ? ITEM[] : ITEM) | null | undefined; export type OptionForCreate = { label: string; __optionForCreate: boolean; }; export type SelectProps = { getItemGroupKey?: GetItemGroupKey | undefined; getGroupKey?: GetGroupKey; sortGroups?: SortGroups; groups?: GROUP[]; items: ITEM[]; dropdownRef: React.MutableRefObject; controlRef: React.MutableRefObject; disabled?: boolean; selectAll?: boolean; getItemLabel: (item: ITEM) => string; getItemKey: (item: ITEM) => string | number; getItemDisabled?: (item: ITEM) => boolean | undefined; searchFunction?: (item: ITEM, searchValue: string) => boolean; onCreate?: (label: string, props: { e: React.SyntheticEvent; label: string; }) => void; onFocus?: React.FocusEventHandler; onBlur?: React.FocusEventHandler; multiple: boolean; searchValue?: string; onChange: OnChangeProp; value: ValueProp; dropdownOpen?: boolean; onDropdownOpen?: (isOpen: boolean) => void; onSearchValueChange?: (value: string) => void; ignoreOutsideClicksRefs?: ReadonlyArray>; }; export type OptionProps = { index: number; item: ITEM | OptionForCreate | SelectAllItem; keyPrefix: string | number; }; export type GetOptionPropsResult = { onClick: (e: React.MouseEvent) => void; onMouseEnter: (e: React.MouseEvent) => void; active: boolean; hovered: boolean; key: string | number; }; export declare const isOptionForCreate: (params: OptionForCreate | Group | ITEM) => params is OptionForCreate; export declare const isNotOptionForCreate: (params: OptionForCreate | Group) => params is Group; export declare const isOptionForSelectAll: (params: SelectAllItem | ITEM) => params is SelectAllItem; export declare function useSelect(params: SelectProps): { isOpen: boolean; isFocused: boolean; highlightedIndex: number; visibleItems: (OptionForCreate | CountedGroup)[]; highlightIndex: (indexForHighlight: IndexForHighlight, scrollToHighlighted: boolean) => void; getOptionProps: ({ index, item, keyPrefix, }: OptionProps) => GetOptionPropsResult; handleInputFocus: (e: React.FocusEvent) => void; handleInputBlur: (e: React.FocusEvent) => void; handleToggleDropdown: () => void; handleInputClick: () => void; inputRef: React.RefObject; getKeyProps: (rest?: import("../../../hooks/useKeysDeprecated").KeyProps) => import("../../../hooks/useKeysDeprecated").KeyProps; handleInputChange: (e: React.ChangeEvent) => void; searchValue: string; clearValue: (e: React.SyntheticEvent) => void; getHandleRemoveValue: (item: ITEM) => (e: React.SyntheticEvent) => void; notFound: boolean; hasItems: boolean; allItemsSelected: boolean; optionsRefs: React.RefObject[]; }; export {};