import { CollectionStateBase, FocusStrategy, Key, Node } from "@react-types/shared";
import { ComboBoxProps, MenuTriggerAction, SelectionMode, ValueType } from "@react-types/combobox";
import { FormValidationState } from "@react-stately/form";
import { ListState } from "@react-stately/list";
import { OverlayTriggerState } from "@react-stately/overlays";
export interface ComboBoxState<T, M extends SelectionMode = 'single'> extends ListState<T>, OverlayTriggerState, FormValidationState {
    /**
     * The key for the first selected item.
     * @deprecated
     */
    readonly selectedKey: Key | null;
    /**
     * The default selected key.
     * @deprecated
     */
    readonly defaultSelectedKey: Key | null;
    /**
     * Sets the selected key.
     * @deprecated
     */
    setSelectedKey(key: Key | null): void;
    /** The current combobox value. */
    readonly value: ValueType<M>;
    /** The default combobox value. */
    readonly defaultValue: ValueType<M>;
    /** Sets the combobox value. */
    setValue(value: Key | readonly Key[] | null): void;
    /**
     * The value of the first selected item.
     * @deprecated
     */
    readonly selectedItem: Node<T> | null;
    /** The value of the selected items. */
    readonly selectedItems: Node<T>[];
    /** The current value of the combo box input. */
    inputValue: string;
    /** The default value of the combo box input. */
    defaultInputValue: string;
    /** Sets the value of the combo box input. */
    setInputValue(value: string): void;
    /** Selects the currently focused item and updates the input value. */
    commit(): void;
    /** Controls which item will be auto focused when the menu opens. */
    readonly focusStrategy: FocusStrategy | null;
    /** Whether the select is currently focused. */
    readonly isFocused: boolean;
    /** Sets whether the select is focused. */
    setFocused(isFocused: boolean): void;
    /** Opens the menu. */
    open(focusStrategy?: FocusStrategy | null, trigger?: MenuTriggerAction): void;
    /** Toggles the menu. */
    toggle(focusStrategy?: FocusStrategy | null, trigger?: MenuTriggerAction): void;
    /** Resets the input value to the previously selected item's text if any and closes the menu.  */
    revert(): void;
}
type FilterFn = (textValue: string, inputValue: string) => boolean;
export interface ComboBoxStateOptions<T, M extends SelectionMode = 'single'> extends Omit<ComboBoxProps<T, M>, 'children'>, CollectionStateBase<T> {
    /** The filter function used to determine if a option should be included in the combo box list. */
    defaultFilter?: FilterFn;
    /** Whether the combo box allows the menu to be open when the collection is empty. */
    allowsEmptyCollection?: boolean;
    /** Whether the combo box menu should close on blur. */
    shouldCloseOnBlur?: boolean;
}
/**
 * Provides state management for a combo box component. Handles building a collection
 * of items from props and manages the option selection state of the combo box. In addition, it tracks the input value,
 * focus state, and other properties of the combo box.
 */
export function useComboBoxState<T extends object, M extends SelectionMode = 'single'>(props: ComboBoxStateOptions<T, M>): ComboBoxState<T>;

//# sourceMappingURL=types.d.ts.map
