import type { SelectOptionList } from '../select'; import type { SelectBaseProps, SelectControlComponent, SelectControlProps, SelectOption, SelectProps, SelectRef, SelectType, } from '../select/Select'; export type ComboboxControlProps< Type extends SelectType = 'single', SelectOptionValue extends string = string, > = SelectControlProps & Pick, 'hideSearchInput' | 'font'> & { /** Search text value */ searchText: string; /** Search text change handler */ onSearch: (searchText: string) => void; /** Reference to the combobox control for positioning */ controlRef: React.RefObject; /** Custom SelectControlComponent to wrap */ SelectControlComponent?: SelectControlComponent; }; export type ComboboxControlComponent = < Type extends SelectType = 'single', SelectOptionValue extends string = string, >( props: ComboboxControlProps, ) => React.ReactElement; export type ComboboxBaseProps< Type extends SelectType = 'single', SelectOptionValue extends string = string, > = SelectBaseProps & { /** Controlled search text value */ searchText?: string; /** Search text change handler */ onSearch?: (searchText: string) => void; /** Custom filter function for searching options */ filterFunction?: ( options: SelectOptionList, searchText: string, ) => SelectOption[]; /** Default search text value for uncontrolled mode */ defaultSearchText?: string; /** Hide the search input */ hideSearchInput?: boolean; /** Custom ComboboxControlComponent to wrap SelectControlComponent. This component must be a stable reference */ ComboboxControlComponent?: ComboboxControlComponent; }; export type ComboboxProps< Type extends SelectType = 'single', SelectOptionValue extends string = string, > = ComboboxBaseProps & Pick, 'styles' | 'classNames'>; export type ComboboxRef = SelectRef; type ComboboxComponent = < Type extends SelectType = 'single', SelectOptionValue extends string = string, >( props: ComboboxProps & { ref?: React.Ref; }, ) => React.ReactElement; export declare const Combobox: ComboboxComponent; export {}; //# sourceMappingURL=Combobox.d.ts.map