/// import type { TextFieldWidth } from '../../../lv1/forms/TextField'; import { MiniTag } from '../../tagBox/MiniTag'; import { debounce } from 'throttle-debounce'; export declare type ComboBoxOption = { label: string; id: string | number; keywords?: string[]; disabled?: boolean; }; export declare type MultiComboBoxOption = ComboBoxOption & { type?: string; extras?: E; } & Pick[0], 'color'>; export declare type SingleComboBoxOption = ComboBoxOption & { subLabel?: string; extras?: E; }; export declare type InternalComboBoxOption = ComboBoxOption & { isTrailingItem?: boolean; fixedItemType?: 'more' | 'add'; } & Pick; export declare type FixedItem = { onSelect: (fieldValue: string) => any; isVisible?: (fieldValue: string, filteredOptions: ComboBoxOption[]) => boolean; label?: (fieldValue: string) => string; }; export declare type FixedItems = [FixedItem] | [FixedItem, FixedItem]; export declare type FetchParams = { name: string; page: number; }; export declare type ApiMetaData = { limit: number; currentPage: number; totalPages: number; totalCount: number; }; export declare const initialFetchParams: { name: string; page: number; }; export declare const useComboBox: ({ value }: { value?: ComboBoxOption | undefined; }) => { fieldValue: string; isOpen: boolean; isFieldChanged: boolean; listOptionsRef: import("react").RefObject; selectedIndex: number; selectedOptionRef: import("react").RefObject; setFieldValue: import("react").Dispatch>; setOpen: import("react").Dispatch>; setIsFieldChanged: import("react").Dispatch>; setSelectedIndex: import("react").Dispatch>; }; export declare const useMultiComboBox: ({ values, options, onChange, onKeyDown, maxSelectionCount, alreadyFilteredByFieldValue, }: { values: MultiComboBoxOption[]; options: MultiComboBoxOption[]; onChange?: ((values: MultiComboBoxOption[]) => void) | undefined; onKeyDown?: ((event: React.KeyboardEvent) => void) | undefined; maxSelectionCount?: number | undefined; alreadyFilteredByFieldValue?: boolean | undefined; }) => { fieldValue: string; setFieldValue: import("react").Dispatch>; isOpen: boolean; setOpen: import("react").Dispatch>; selectedIndex: number; setSelectedIndex: import("react").Dispatch>; borderRef: import("react").RefObject; selectedOptionRef: import("react").RefObject; listOptionsRef: import("react").RefObject; filteredOptions: MultiComboBoxOption[]; handleKeyDown: (e: React.KeyboardEvent, loadMore?: (() => void) | undefined, onClickNewItem?: ((fieldValue: string) => void) | undefined) => void; onSelectOption: (option: MultiComboBoxOption) => void; onRemoveOption: (option: MultiComboBoxOption) => void; }; export declare const useAdjustListPosition: (isOpen: boolean, ref?: import("react").Ref | import("react").MutableRefObject | undefined) => { textFieldRef: import("react").MutableRefObject; listOptionsMaxHeight: string; }; export declare const createListBoxClassName: ({ isOpen, width, listWidth, }: { isOpen: boolean; listWidth?: "small" | "medium" | "large" | "xSmall" | undefined; width?: TextFieldWidth | undefined; }) => string; export declare const useFetchItems: ({ fieldValue, currentPage, fetchItems, totalPages, isFieldChanged, }: { fieldValue: string; currentPage: number; fetchItems: (params: FetchParams) => Promise; totalPages: number; isFieldChanged?: boolean | undefined; }) => { isLoadingMore: boolean; fetchParams: FetchParams; debouncedFetchItems: debounce<(params: FetchParams) => Promise>; loadMore: () => void; }; export declare const useFetchItemsForComboBox: ({ createOptions, fetchItems, fetchOnInit, initialName, responseAdapter, }: { createOptions: (items: T[]) => ComboBoxOption[]; fetchItems: (params: FetchParams) => Promise; fetchOnInit?: boolean | undefined; initialName?: string | undefined; responseAdapter?: ((response: any) => { items: T[]; meta: ApiMetaData; }) | undefined; }) => { items: T[]; meta: ApiMetaData; options: ComboBoxOption[]; setResponse: import("react").Dispatch>; isLoading: boolean; hasFetched: boolean; currentFetchParams: FetchParams; fetchItemsForComboBox: ({ name, page, }?: FetchParams) => Promise; };