import * as Core from "@ariakit/core/tab/tab-store"; import type { ComboboxStore } from "../combobox/combobox-store.ts"; import type { CompositeStore, CompositeStoreFunctions, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.ts"; import type { Store } from "../utils/store.tsx"; export declare function useTabStoreProps(store: T, update: () => void, props: TabStoreProps): T & { panels: import("@ariakit/core/collection/collection-store").CollectionStore & { useState: import("../utils/store.tsx").UseState>; }; } & { composite: CompositeStore | null | undefined; combobox: ComboboxStore | null | undefined; }; /** * Creates a tab store to control the state of * [Tab](https://ariakit.com/components/tab) components. * @see https://ariakit.com/components/tab * @example * ```jsx * const tab = useTabStore(); * * * Tab 1 * Tab 2 * * Panel 1 * Panel 2 * ``` */ export declare function useTabStore(props?: TabStoreProps): TabStore; export interface TabStoreItem extends Core.TabStoreItem { } export interface TabStoreState extends Core.TabStoreState, CompositeStoreState { } export interface TabStoreFunctions extends Pick, Omit, CompositeStoreFunctions { panels: Store; } export interface TabStoreOptions extends Omit, CompositeStoreOptions { /** * Function that will be called when the * [`selectedId`](https://ariakit.com/reference/tab-provider#selectedid) state * changes. * * Live examples: * - [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) */ setSelectedId?: (selectedId: TabStoreState["selectedId"]) => void; /** * A reference to another [composite * store](https://ariakit.com/reference/use-composite-store). This is * automatically set when rendering tabs as part of another composite widget, * such as [Combobox](https://ariakit.com/components/combobox) or * [Select](https://ariakit.com/components/select). * * Live examples: * - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs) */ composite?: CompositeStore | null; /** * A reference to a [combobox * store](https://ariakit.com/reference/use-combobox-store). This is * automatically set when rendering tabs inside a * [Combobox](https://ariakit.com/components/combobox). * * Live examples: * - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs) */ combobox?: ComboboxStore | null; } export interface TabStoreProps extends TabStoreOptions, Omit { } export interface TabStore extends TabStoreFunctions, Omit, "panels" | "composite" | "combobox"> { }