import type { ComboboxStore } from "../combobox/combobox-store.js";
import type { CompositeStoreFunctions, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.js";
import type { HovercardStoreFunctions, HovercardStoreOptions, HovercardStoreState } from "../hovercard/hovercard-store.js";
import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
import type { BivariantCallback, PickRequired, SetState, SetStateAction } from "../utils/types.js";
type Values = Record<string, string | boolean | number | Array<string | number>>;
export declare function createMenuStore<T extends Values = Values>(props: PickRequired<MenuStoreProps<T>, "values" | "defaultValues">): MenuStore<T>;
export declare function createMenuStore(props?: MenuStoreProps): MenuStore;
export type MenuStoreValues = Record<string, string | boolean | number | Array<string | number>>;
export interface MenuStoreState<T extends Values = Values> extends CompositeStoreState, HovercardStoreState {
    /**
     * Determines the element that should be focused when the menu is opened.
     */
    initialFocus: "container" | "first" | "last";
    /**
     * A map of names and values that will be used by the `MenuItemCheckbox` and
     * `MenuItemRadio` components.
     */
    values: T;
    /** @default "vertical" */
    orientation: CompositeStoreState["orientation"];
    /** @default "bottom-start" */
    placement: HovercardStoreState["placement"];
    /** @default 0 */
    hideTimeout?: HovercardStoreState["hideTimeout"];
}
export interface MenuStoreFunctions<T extends Values = Values> extends CompositeStoreFunctions, HovercardStoreFunctions {
    /**
     * Sets the `initialFocus` state.
     */
    setInitialFocus: SetState<MenuStoreState<T>["initialFocus"]>;
    /**
     * Sets the `values` state.
     * @example
     * store.setValues({ watching: ["issues"] });
     * store.setValues((values) => ({ ...values, watching: ["issues"] }));
     */
    setValues: SetState<MenuStoreState<T>["values"]>;
    /**
     * Sets a specific menu value.
     * @param name The name.
     * @param value The value.
     * @example
     * store.setValue("watching", ["issues"]);
     * store.setValue("watching", (value) => [...value, "issues"]);
     */
    setValue: BivariantCallback<(name: string, value: SetStateAction<MenuStoreState<T>["values"][string]>) => void>;
}
export interface MenuStoreOptions<T extends Values = Values> extends StoreOptions<MenuStoreState<T>, "orientation" | "placement" | "hideTimeout" | "values">, CompositeStoreOptions, HovercardStoreOptions {
    /**
     * A reference to a combobox store. This is used when combining the combobox
     * with a menu (e.g., dropdown menu with a search input). The stores will
     * share the same state.
     */
    combobox?: ComboboxStore;
    /**
     * The default values for the `values` state.
     * @default {}
     */
    defaultValues?: MenuStoreState<T>["values"];
}
export type MenuStoreProps<T extends Values = Values> = MenuStoreOptions<T> & StoreProps<MenuStoreState<T>>;
export type MenuStore<T extends Values = Values> = MenuStoreFunctions<T> & Store<MenuStoreState<T>>;
export {};
