import * as Core from "@ariakit/core/combobox/combobox-store"; import type { PickRequired } from "@ariakit/core/utils/types"; import type { CompositeStoreFunctions, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.ts"; import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts"; import type { TagStore } from "../tag/tag-store.ts"; import type { Store } from "../utils/store.tsx"; export declare function useComboboxStoreOptions(props: T): { id: string | undefined; } & T; export declare function useComboboxStoreProps(store: T, update: () => void, props: ComboboxStoreProps): T & { disclosure: import("../disclosure/disclosure-store.ts").DisclosureStore | null | undefined; } & { tag: TagStore | null | undefined; }; /** * Creates a combobox store to control the state of * [Combobox](https://ariakit.com/components/combobox) components. * @see https://ariakit.com/components/combobox * @example * ```jsx * const combobox = useComboboxStore(); * * * * * * * * * * ``` */ export declare function useComboboxStore(props: PickRequired, "selectedValue" | "defaultSelectedValue">): ComboboxStore; export declare function useComboboxStore(props?: ComboboxStoreProps): ComboboxStore; export type ComboboxStoreSelectedValue = Core.ComboboxStoreSelectedValue; export interface ComboboxStoreItem extends Core.ComboboxStoreItem { } export interface ComboboxStoreState extends Core.ComboboxStoreState, CompositeStoreState, PopoverStoreState { } export interface ComboboxStoreFunctions extends Pick, "tag">, Omit, "tag" | "disclosure">, CompositeStoreFunctions, PopoverStoreFunctions { } export interface ComboboxStoreOptions extends Omit, "tag" | "disclosure">, CompositeStoreOptions, PopoverStoreOptions { /** * A callback that gets called when the * [`value`](https://ariakit.com/reference/combobox-provider#value) state * changes. * * Live examples: * - [Combobox with integrated * filter](https://ariakit.com/examples/combobox-filtering-integrated) * - [ComboboxGroup](https://ariakit.com/examples/combobox-group) * - [Combobox with links](https://ariakit.com/examples/combobox-links) * - [Multi-selectable * Combobox](https://ariakit.com/examples/combobox-multiple) * - [Menu with Combobox](https://ariakit.com/examples/menu-combobox) * - [Select with Combobox](https://ariakit.com/examples/select-combobox) */ setValue?: (value: ComboboxStoreState["value"]) => void; /** * A callback that's invoked when the * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue) * state changes, typically when the user selects an item. This can be used to * implement behavior like `onSelect` or `onItemSelect`. * * Live examples: * - [Multi-selectable * Combobox](https://ariakit.com/examples/combobox-multiple) */ setSelectedValue?: (value: ComboboxStoreState["selectedValue"]) => void; /** * A reference to a [tag store](https://ariakit.com/apis/use-tag-store). It's * automatically set when rendering a combobox within a tag list. */ tag?: TagStore | null; } export interface ComboboxStoreProps extends ComboboxStoreOptions, Omit, "tag" | "disclosure"> { } export interface ComboboxStore extends ComboboxStoreFunctions, Omit>, "tag" | "disclosure"> { }