import { i as CompositeStoreOptions, n as CompositeStoreFunctions, r as CompositeStoreItem, s as CompositeStoreState } from "../composite-store-C5m2qUBo.js";
import { a as PopoverStoreState, n as PopoverStoreFunctions, r as PopoverStoreOptions } from "../popover-store-D7hAv3_R.js";
import { t as TagStore } from "../tag-store-DG5sziVc.js";
import { Store, StoreOptions, StoreProps } from "@ariakit/store";
import { PickRequired, SetState } from "@ariakit/utils";
//#region src/combobox/combobox-store.d.ts
type MutableValue<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> = T extends string ? string : T;
/**
 * Creates a combobox store.
 */
declare function createComboboxStore<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue>(props: PickRequired<ComboboxStoreProps<T>, "selectedValue" | "defaultSelectedValue">): ComboboxStore<T>;
declare function createComboboxStore(props?: ComboboxStoreProps): ComboboxStore;
type ComboboxStoreSelectedValue = string | readonly string[];
interface ComboboxStoreItem extends CompositeStoreItem {
  value?: string;
}
interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreState<ComboboxStoreItem>, PopoverStoreState {
  /**
   * Defaults to `true`, or `false` when a
   * [`ComboboxSelect`](https://ariakit.com/reference/combobox-select) is
   * rendered.
   */
  compositeElementInFocusOrder: CompositeStoreState<ComboboxStoreItem>["compositeElementInFocusOrder"];
  /**
   * @deprecated Use
   * [`compositeElementInFocusOrder`](https://ariakit.com/reference/combobox-provider#compositeelementinfocusorder)
   * instead.
   */
  includesBaseElement: CompositeStoreState<ComboboxStoreItem>["includesBaseElement"];
  /**
   * Defaults to `true`, or `false` when a
   * [`ComboboxSelect`](https://ariakit.com/reference/combobox-select) is
   * rendered.
   */
  focusLoop: CompositeStoreState<ComboboxStoreItem>["focusLoop"];
  /**
   * Defaults to `true`, or `false` when a
   * [`ComboboxSelect`](https://ariakit.com/reference/combobox-select) is
   * rendered.
   */
  focusWrap: CompositeStoreState<ComboboxStoreItem>["focusWrap"];
  /** @default "vertical" */
  orientation: CompositeStoreState<ComboboxStoreItem>["orientation"];
  /** @default true */
  virtualFocus: CompositeStoreState<ComboboxStoreItem>["virtualFocus"];
  /**
   * The combobox input value.
   *
   * Live examples:
   * - [Combobox with integrated
   *   filter](https://ariakit.com/examples/combobox-filtering-integrated)
   * - [Combobox with links](https://ariakit.com/examples/combobox-links)
   * - [Combobox filtering](https://ariakit.com/examples/combobox-filtering)
   * - [Multi-selectable
   *   Combobox](https://ariakit.com/examples/combobox-multiple)
   * - [Textarea with inline
   *   Combobox](https://ariakit.com/examples/combobox-textarea)
   * - [Command Menu with
   *   Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
   */
  inputValue: string;
  /**
   * The combobox input value.
   * @deprecated Use
   * [`inputValue`](https://ariakit.com/reference/combobox-provider#inputvalue)
   * instead.
   */
  value: string;
  /**
   * The value of the currently active item. This state automatically updates as
   * the user navigates the combobox items either by keyboard or mouse click.
   * Note that it doesn't update when the user simply hovers over the items.
   */
  activeValue: string | undefined;
  /**
   * The value(s) of the currently selected item(s). This can be a string or an
   * array of strings. If it's an array, the combobox is considered
   * [multi-selectable](https://ariakit.com/examples/combobox-multiple).
   *
   * Live examples:
   * - [Multi-selectable
   *   Combobox](https://ariakit.com/examples/combobox-multiple)
   * - [Form with Select](https://ariakit.com/examples/form-select)
   * - [Select grid](https://ariakit.com/examples/select-grid)
   * - [Select with custom
   *   items](https://ariakit.com/examples/select-item-custom)
   * - [Multi-selectable Combobox
   *   Select](https://ariakit.com/examples/select-multiple)
   * - [Toolbar with Select](https://ariakit.com/examples/toolbar-select)
   * - [Combobox Select with Next.js App
   *   Router](https://ariakit.com/examples/select-next-router)
   */
  selectedValue: MutableValue<T>;
  /**
   * Whether the combobox
   * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
   * should be set when the active item changes by moving while
   * [`ComboboxSelect`](https://ariakit.com/reference/combobox-select) is open.
   * The selected value is always updated when moving while the select is
   * closed.
   *
   * Live examples:
   * - [Select grid](https://ariakit.com/examples/select-grid)
   * - [Select with custom
   *   items](https://ariakit.com/examples/select-item-custom)
   * @default false
   */
  selectOnMove: boolean;
  /**
   * Whether to reset the value when the combobox popover closes. This prop is
   * automatically set to `true` by default if the combobox supports multiple
   * selections. In other words, if the
   * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
   * or
   * [`defaultSelectedValue`](https://ariakit.com/reference/combobox-provider#defaultselectedvalue)
   * props are arrays. However, when the combobox is connected to a
   * [`tag`](https://ariakit.com/reference/combobox-provider#tag) store, the
   * default is `false` so the input value is kept when the popover closes.
   *
   * Live examples:
   * - [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)
   * - [Submenu with
   *   Combobox](https://ariakit.com/examples/menu-nested-combobox)
   * - [Command Menu with
   *   Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
   * - [Select with Combobox and
   *   Tabs](https://ariakit.com/examples/select-combobox-tab)
   */
  resetValueOnHide: boolean;
  /**
   * Whether to reset the value when an item is selected. This prop is
   * automatically set to `true` by default if the combobox supports multiple
   * selections. In other words, if the
   * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
   * or
   * [`defaultSelectedValue`](https://ariakit.com/reference/combobox-provider#defaultselectedvalue)
   * props are arrays.
   * @deprecated Use the
   * [`resetValueOnSelect`](https://ariakit.com/reference/combobox-item#resetvalueonselect)
   * prop on [`ComboboxItem`](https://ariakit.com/reference/combobox-item)
   * instead.
   */
  resetValueOnSelect: boolean;
  /**
   * The combobox input element.
   */
  inputElement: HTMLElement | null;
  /**
   * The combobox input label element.
   */
  labelElement: HTMLElement | null;
  /**
   * The combobox select element.
   *
   * Live examples:
   * - [Form with Select](https://ariakit.com/examples/form-select)
   */
  selectElement: HTMLElement | null;
  /**
   * The combobox select label element.
   */
  selectLabelElement: HTMLElement | null;
}
interface ComboboxStoreFunctions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends Pick<ComboboxStoreOptions<T>, "tag">, CompositeStoreFunctions<ComboboxStoreItem>, PopoverStoreFunctions {
  /**
   * Sets the
   * [`inputValue`](https://ariakit.com/reference/combobox-provider#inputvalue)
   * state.
   *
   * Live examples:
   * - [Textarea with inline
   *   Combobox](https://ariakit.com/examples/combobox-textarea)
   * @example
   * store.setInputValue("Hello world");
   * store.setInputValue((value) => value + "!");
   */
  setInputValue: SetState<ComboboxStoreState<T>["inputValue"]>;
  /**
   * Resets the
   * [`inputValue`](https://ariakit.com/reference/combobox-provider#inputvalue)
   * state to its initial value.
   */
  resetInputValue: () => void;
  /**
   * Sets the
   * [`inputValue`](https://ariakit.com/reference/combobox-provider#inputvalue)
   * state.
   * @deprecated Use [`setInputValue`](https://ariakit.com/reference/combobox-provider#setinputvalue)
   * instead.
   */
  setValue: SetState<ComboboxStoreState<T>["value"]>;
  /**
   * Resets the
   * [`inputValue`](https://ariakit.com/reference/combobox-provider#inputvalue)
   * state to its initial value.
   * @deprecated Use
   * [`resetInputValue`](https://ariakit.com/reference/use-combobox-store#resetinputvalue)
   * instead.
   */
  resetValue: () => void;
  /**
   * Sets the
   * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
   * state.
   */
  setSelectedValue: SetState<ComboboxStoreState<T>["selectedValue"]>;
  /**
   * Sets the `inputElement` state.
   */
  setInputElement: SetState<ComboboxStoreState<T>["inputElement"]>;
  /**
   * Sets the `labelElement` state.
   */
  setLabelElement: SetState<ComboboxStoreState<T>["labelElement"]>;
  /**
   * Sets the `selectElement` state.
   */
  setSelectElement: SetState<ComboboxStoreState<T>["selectElement"]>;
  /**
   * Sets the `selectLabelElement` state.
   */
  setSelectLabelElement: SetState<ComboboxStoreState<T>["selectLabelElement"]>;
}
interface ComboboxStoreOptions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends StoreOptions<ComboboxStoreState<T>, "compositeElementInFocusOrder" | "focusLoop" | "focusWrap" | "orientation" | "virtualFocus" | "inputValue" | "value" | "selectedValue" | "selectOnMove" | "resetValueOnHide" | "resetValueOnSelect">, CompositeStoreOptions<ComboboxStoreItem>, PopoverStoreOptions {
  /** @default null */
  defaultActiveId?: CompositeStoreOptions<ComboboxStoreItem>["activeId"];
  /**
   * The initial value of the combobox input.
   * @default ""
   */
  defaultInputValue?: ComboboxStoreState<T>["inputValue"];
  /**
   * The initial value of the combobox input.
   * @deprecated Use
   * [`defaultInputValue`](https://ariakit.com/reference/combobox-provider#defaultinputvalue)
   * instead.
   * @default ""
   */
  defaultValue?: ComboboxStoreState<T>["value"];
  /**
   * The initial value of the
   * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
   * state. This can be a string or an array of strings. If it's an array, the
   * combobox is considered
   * [multi-selectable](https://ariakit.com/examples/combobox-multiple).
   *
   * The default value is `""` for a plain combobox. When a
   * [`ComboboxSelect`](https://ariakit.com/reference/combobox-select) is
   * rendered, the first enabled item with a defined value is selected instead.
   * Pass `""` explicitly to prevent this automatic selection.
   *
   * Live examples:
   * - [Form with Select](https://ariakit.com/examples/form-select)
   * - [Animated Select](https://ariakit.com/examples/select-animated)
   * - [Searchable Combobox
   *   Select](https://ariakit.com/examples/select-combobox)
   * - [Select group](https://ariakit.com/examples/select-group)
   * - [Combobox Select with Next.js App
   *   Router](https://ariakit.com/examples/select-next-router)
   * - [Combobox Select with
   *   Tabs](https://ariakit.com/examples/select-combobox-tab)
   */
  defaultSelectedValue?: ComboboxStoreState<T>["selectedValue"];
  /**
   * A reference to a tag store. This is used when rendering a combobox within a
   * tag list. The stores will share the same state.
   */
  tag?: TagStore | null;
}
interface ComboboxStoreProps<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends ComboboxStoreOptions<T>, StoreProps<ComboboxStoreState<T>> {}
interface ComboboxStore<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends ComboboxStoreFunctions<T>, Store<ComboboxStoreState<T>> {}
//#endregion
export { ComboboxStore, ComboboxStoreFunctions, ComboboxStoreItem, ComboboxStoreOptions, ComboboxStoreProps, ComboboxStoreSelectedValue, ComboboxStoreState, createComboboxStore };
//# sourceMappingURL=combobox-store.d.ts.map