import { r as CollectionStoreItem, t as CollectionStore } from "../collection-store-pWfIj1Gh.js";
import { i as CompositeStoreOptions, n as CompositeStoreFunctions, r as CompositeStoreItem, s as CompositeStoreState, t as CompositeStore } from "../composite-store-C5m2qUBo.js";
import { ComboboxStore } from "../combobox/combobox-store.js";
import { SelectStore } from "../select/select-store.js";
import { Store, StoreOptions, StoreProps } from "@ariakit/store";
import { SetState } from "@ariakit/utils";
//#region src/tab/tab-store.d.ts
declare function createTabStore({ composite: parentComposite, combobox, ...props }?: TabStoreProps): TabStore;
interface TabStoreItem extends CompositeStoreItem {
  dimmed?: boolean;
}
interface TabStorePanel extends CollectionStoreItem {
  tabId?: string | null;
}
interface TabStoreState extends CompositeStoreState<TabStoreItem> {
  /** @default "horizontal" */
  orientation: CompositeStoreState<TabStoreItem>["orientation"];
  /** @default true */
  focusLoop: CompositeStoreState<TabStoreItem>["focusLoop"];
  /**
   * The id of the tab whose panel is currently visible. If it's `undefined`, it
   * will be automatically set to the first enabled tab.
   *
   * Live examples:
   * - [Tab with React Router](https://ariakit.com/examples/tab-react-router)
   * - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs)
   * - [Select with Combobox and
   *   Tabs](https://ariakit.com/examples/select-combobox-tab)
   * - [Command Menu with
   *   Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
   */
  selectedId: TabStoreState["activeId"];
  /**
   * Determines if the tab should be selected when it receives focus. If set to
   * `false`, the tab will only be selected upon clicking, not when using arrow
   * keys to shift focus.
   *
   * Live examples:
   * - [Tab with React Router](https://ariakit.com/examples/tab-react-router)
   * - [Select with Combobox and
   *   Tabs](https://ariakit.com/examples/select-combobox-tab)
   * @default true
   */
  selectOnMove?: boolean;
}
interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem> {
  /**
   * Sets the
   * [`selectedId`](https://ariakit.com/reference/tab-provider#selectedid) state.
   * If another tab has DOM focus and the selected tab is enabled, focus will
   * move to the selected tab. If you want to always move focus, use the
   * [`select`](https://ariakit.com/reference/use-tab-store#select) function
   * instead.
   * @example
   * // Selects the tab with id "tab-1"
   * store.setSelectedId("tab-1");
   * // Toggles between "tab-1" and "tab-2"
   * store.setSelectedId((id) => id === "tab-1" ? "tab-2" : "tab-1"));
   * // Selects the first tab
   * store.setSelectedId(store.first());
   * // Selects the next tab
   * store.setSelectedId(store.next());
   */
  setSelectedId: SetState<TabStoreState["selectedId"]>;
  /**
   * A collection store containing the tab panels.
   *
   * Live examples:
   * - [Animated TabPanel](https://ariakit.com/examples/tab-panel-animated)
   */
  panels: CollectionStore<TabStorePanel>;
  /**
   * Gets the panel associated with the given tab id.
   * @example
   * const panel = store.panel("tab-1");
   */
  panel: (tabId: string | null | undefined) => TabStorePanel | null;
  /**
   * Selects the tab for the given id and moves focus to it. If you want to set
   * the [`selectedId`](https://ariakit.com/reference/tab-provider#selectedid)
   * state without always moving focus, use the
   * [`setSelectedId`](https://ariakit.com/reference/use-tab-store#setselectedid-1)
   * function instead.
   * @example
   * // Selects the tab with id "tab-1"
   * store.select("tab-1");
   * // Selects the first tab
   * store.select(store.first());
   * // Selects the next tab
   * store.select(store.next());
   */
  select: TabStore["move"];
}
interface TabStoreOptions extends StoreOptions<TabStoreState, "orientation" | "focusLoop" | "selectedId" | "selectOnMove">, CompositeStoreOptions<TabStoreItem> {
  /**
   * A reference to another [composite
   * store](https://ariakit.com/reference/use-composite-store). This is used when
   * rendering tabs as part of another composite widget such as
   * [Combobox](https://ariakit.com/components/combobox) or
   * [Select](https://ariakit.com/components/select). The stores will share the
   * same state.
   */
  composite?: CompositeStore | SelectStore | null;
  /**
   * A reference to a [combobox
   * store](https://ariakit.com/reference/use-combobox-store). This is used when
   * rendering tabs inside a
   * [Combobox](https://ariakit.com/components/combobox).
   */
  combobox?: ComboboxStore | null;
  /**
   * The id of the tab whose panel is currently visible. If it's `undefined`, it
   * will be automatically set to the first enabled tab.
   *
   * Live examples:
   * - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs)
   * - [Animated TabPanel](https://ariakit.com/examples/tab-panel-animated)
   * - [Select with Combobox and
   *   Tabs](https://ariakit.com/examples/select-combobox-tab)
   * - [Command Menu with
   *   Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
   */
  defaultSelectedId?: TabStoreState["selectedId"];
}
interface TabStoreProps extends TabStoreOptions, StoreProps<TabStoreState> {}
interface TabStore extends TabStoreFunctions, Store<TabStoreState> {}
//#endregion
export { TabStore, TabStoreFunctions, TabStoreItem, TabStoreOptions, TabStorePanel, TabStoreProps, TabStoreState, createTabStore };
//# sourceMappingURL=tab-store.d.ts.map