import { Dispatch, PropsWithChildren, RefObject, SetStateAction } from 'react';
import { ComboboxItem, DownshiftState, ItemsMap } from './types';
export interface ComboboxContextState extends DownshiftState {
    itemsMap: ItemsMap;
    filteredItemsMap: ItemsMap;
    highlightedItem: ComboboxItem | undefined;
    hasPopover: boolean;
    areSelectedItemsInTrigger: boolean;
    multiple: boolean;
    disabled: boolean;
    readOnly: boolean;
    wrap?: boolean;
    state?: 'error' | 'alert' | 'success';
    lastInteractionType: 'mouse' | 'keyboard';
    setHasPopover: Dispatch<SetStateAction<boolean>>;
    setAreSelectedItemsInTrigger: Dispatch<SetStateAction<boolean>>;
    setLastInteractionType: (type: 'mouse' | 'keyboard') => void;
    setOnInputValueChange: Dispatch<SetStateAction<((v: string) => void) | null>>;
    innerInputRef: RefObject<HTMLInputElement | null>;
    triggerAreaRef: RefObject<HTMLDivElement | null>;
    isLoading?: boolean;
    isTyping?: boolean;
    setIsTyping: Dispatch<SetStateAction<boolean>>;
}
export type ComboboxContextCommonProps = PropsWithChildren<{
    /**
     * The controlled open state of the select. Must be used in conjunction with `onOpenChange`.
     */
    open?: boolean;
    /**
     * Event handler called when the open state of the select changes.
     */
    onOpenChange?: (isOpen: boolean) => void;
    /**
     * The open state of the select when it is initially rendered. Use when you do not need to control its open state.
     */
    defaultOpen?: boolean;
    /**
     * Use `state` prop to assign a specific state to the combobox, choosing from: `error`, `alert` and `success`. By doing so, the outline styles will be updated.
     */
    state?: 'error' | 'alert' | 'success';
    /**
     * When true, prevents the user from interacting with the combobox.
     */
    disabled?: boolean;
    /**
     * Sets the combobox as interactive or not.
     */
    readOnly?: boolean;
    /**
     * When true, the items will be filtered depending on the value of the input (not case-sensitive).
     */
    filtering?: 'none' | 'auto' | 'strict';
    /**
     * By default, the combobox will clear or restore the input value to the selected item value on blur.
     */
    allowCustomValue?: boolean;
    /**
     * In multiple selection, many selected items might be displayed. Be default, the combobox trigger will expand vertically to display them all.
     * If you wish to keep every item on a single line, disabled this property.
     */
    wrap?: boolean;
    /**
     * Display a spinner to indicate to the user that the combobox is loading results for .
     */
    isLoading?: boolean;
}>;
interface ComboboxPropsSingle {
    /**
     * Prop 'multiple' indicating whether multiple values are allowed.
     */
    multiple?: false;
    /**
     * The value of the select when initially rendered. Use when you do not need to control the state of the select.
     */
    defaultValue?: string;
    /**
     * The controlled value of the select. Should be used in conjunction with `onValueChange`.
     */
    value?: string | null;
    /**
     * Event handler called when the value changes.
     */
    onValueChange?: (value: string) => void;
}
interface ComboboxPropsMultiple {
    /**
     * Prop 'multiple' indicating whether multiple values are allowed.
     */
    multiple: true;
    /**
     * The value of the select when initially rendered. Use when you do not need to control the state of the select.
     */
    defaultValue?: string[];
    /**
     * The controlled value of the select. Should be used in conjunction with `onValueChange`.
     */
    value?: string[];
    /**
     * Event handler called when the value changes.
     */
    onValueChange?: (value: string[]) => void;
}
export type ComboboxContextProps = ComboboxContextCommonProps & (ComboboxPropsSingle | ComboboxPropsMultiple);
export declare const ID_PREFIX = ":combobox";
export declare const ComboboxProvider: ({ children, state: stateProp, allowCustomValue, filtering, disabled: disabledProp, multiple, readOnly: readOnlyProp, wrap, value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, isLoading, }: ComboboxContextProps) => import("react/jsx-runtime").JSX.Element;
export declare const useComboboxContext: () => ComboboxContextState;
export {};
