import type { AriaAttributes, ChangeEvent, MouseEvent, KeyboardEvent as ReactKeyboardEvent } from "react";
import type { BooleanOrCallback, StringWithValue } from "@ariakit/core/utils/types";
import type { CompositeOptions } from "../composite/composite.js";
import type { PopoverAnchorOptions } from "../popover/popover-anchor.js";
import type { As, Props } from "../utils/types.js";
import type { ComboboxStore } from "./combobox-store.js";
/**
 * Returns props to create a `Combobox` component.
 * @see https://ariakit.org/components/combobox
 * @example
 * ```jsx
 * const store = useComboboxStore();
 * const props = useCombobox({ store });
 * <Role {...props} />
 * <ComboboxPopover store={store}>
 *   <ComboboxItem value="Apple" />
 *   <ComboboxItem value="Banana" />
 *   <ComboboxItem value="Orange" />
 * </ComboboxPopover>
 * ```
 */
export declare const useCombobox: import("../utils/types.js").Hook<ComboboxOptions<"input">>;
/**
 * Renders a combobox input.
 * @see https://ariakit.org/components/combobox
 * @example
 * ```jsx
 * const combobox = useComboboxStore();
 * <Combobox store={combobox} />
 * <ComboboxPopover store={combobox}>
 *   <ComboboxItem value="Apple" />
 *   <ComboboxItem value="Banana" />
 *   <ComboboxItem value="Orange" />
 * </ComboboxPopover>
 * ```
 */
export declare const Combobox: import("../utils/types.js").Component<ComboboxOptions<"input">>;
export interface ComboboxOptions<T extends As = "input"> extends CompositeOptions<T>, PopoverAnchorOptions<T> {
    /**
     * Object returned by the `useComboboxStore` hook.
     */
    store: ComboboxStore;
    /**
     * Whether the first item will be automatically selected when the combobox
     * input value changes. When it's set to `true`, the exact behavior will
     * depend on the value of `autoComplete` prop:
     * - If `autoComplete` is `both` or `inline`, the first item is automatically
     *   focused when the popup opens, and the input value changes to reflect
     *   this. The inline completion string will be highlighted and will have a
     *   selected state.
     * - If `autoComplete` is `list` or `none`, the first item is automatically
     *   focused when the popup opens, but the input value doesn't change.
     *
     * Live examples:
     * - [ComboboxCancel](https://ariakit.org/examples/combobox-cancel)
     * - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
     * - [Combobox with links](https://ariakit.org/examples/combobox-links)
     * - [Textarea with inline
     *   Combobox](https://ariakit.org/examples/combobox-textarea)
     * @default false
     */
    autoSelect?: boolean;
    /**
     * Whether the items will be filtered based on `value` and whether the input
     * value will temporarily change based on the active item. If `defaultList` or
     * `list` are provided, this will be set to `list` by default, otherwise it'll
     * default to `none`.
     * - `both`: the items will be filtered based on `value` and the input value
     *   will temporarily change based on the active item.
     * - `list`: the items will be filtered based on `value` and the input value
     *   will NOT change based on the active item.
     * - `inline`: the items are static, that is, they won't be filtered based on
     *   `value`, but the input value will temporarily change based on the active
     *   item.
     * - `none`: the items are static and the input value will NOT change based on
     *   the active item.
     *
     * Live examples:
     * - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
     */
    autoComplete?: StringWithValue<Required<AriaAttributes>["aria-autocomplete"]>;
    /**
     * Whether the combobox list/popover should be shown when the input value is
     * changed.
     *
     * Live examples:
     * - [Textarea with inline
     *   Combobox](https://ariakit.org/examples/combobox-textarea)
     * @default true
     * @example
     * ```jsx
     * <Combobox showOnChange={(event) => event.target.value.length > 1} />
     * ```
     */
    showOnChange?: BooleanOrCallback<ChangeEvent<HTMLElement>>;
    /**
     * Whether the combobox store value will be updated when the input value
     * changes. This is useful if you want to customize how the store value is
     * updated based on the input value.
     *
     * Live examples:
     * - [Textarea with inline
     *   Combobox](https://ariakit.org/examples/combobox-textarea)
     * @default true
     */
    setValueOnChange?: BooleanOrCallback<ChangeEvent<HTMLElement>>;
    /**
     * Whether the combobox list/popover should be shown when the input is
     * clicked.
     *
     * Live examples:
     * - [Textarea with inline
     *   Combobox](https://ariakit.org/examples/combobox-textarea)
     * @default true
     * @example
     * ```jsx
     * const combobox = useComboboxStore();
     * const canShow = combobox.useState((state) => state.value.length > 1);
     * <Combobox store={combobox} showOnMouseDown={canShow} />
     * ```
     */
    showOnMouseDown?: BooleanOrCallback<MouseEvent<HTMLElement>>;
    /**
     * Whether the combobox list/popover should be shown when the user presses
     * the arrow up or down keys while focusing on the combobox input element.
     *
     * Live examples:
     * - [Textarea with inline
     *   Combobox](https://ariakit.org/examples/combobox-textarea)
     * @default true
     * @example
     * ```jsx
     * const combobox = useComboboxStore();
     * const canShow = combobox.useState((state) => state.value.length > 1);
     * <Combobox store={combobox} showOnKeyDown={canShow} />
     * ```
     */
    showOnKeyDown?: BooleanOrCallback<ReactKeyboardEvent<HTMLElement>>;
    /**
     * Whether the combobox store value will be updated when the combobox input
     * element gets clicked. This usually only applies when `autoComplete` is
     * `both` or `inline`, because the input value will temporarily change based
     * on the active item and the store value will not be updated until the user
     * confirms the selection.
     * @default true
     */
    setValueOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
}
export type ComboboxProps<T extends As = "input"> = Props<ComboboxOptions<T>>;
