import { Store } from "@tanstack/store"; //#region src/web/stores/menuStore.d.ts /** A selection-bar axis name: the built-in 'preset'/'domains'/'mode', or a plugin-declared axis such as 'profile'. */ export type MenuKind = string; export interface MenuClaim { /** The agent dialog rendered as the bar's popover instead of the modal. */ dialogId: string; menu: MenuKind; } export interface MenuState { /** Selection-bar button whose command is in flight, if any. */ pending: MenuKind | null; /** When it was clicked; a stale anchor must not restyle an unrelated dialog. */ at: number; /** The dialog the last click claimed, so the bar and the overlay agree who renders it. */ claimed: MenuClaim | null; } export declare const menuStore: Store; /** * Remembers which selection-bar button asked the agent a question. * * The agent answers with an ordinary select dialog; this is the only signal * that lets the bar render it as its popover menu rather than a centered * modal. The button shows a pending state until the dialog arrives, the run * settles, or the anchor goes stale. */ export declare function setPendingMenu(kind: MenuKind): void; export declare function clearPendingMenu(): void; /** The menu behind an arriving dialog, or null when none was asked for recently. */ export declare function pendingMenuFor(now: number): MenuKind | null; /** * Spends the pending anchor on an arriving select dialog. Called once per * dialog, at frame time, so every surface reads the same verdict on its * first render and the modal never flashes before the popover takes over. */ export declare function claimDialogMenu(dialogId: string, now?: number): MenuClaim | null; /** Forgets a claim once its dialog is gone. */ export declare function releaseDialogMenu(dialogId: string): void; /** Test seam. */ export declare function resetMenuStore(): void; //#endregion //# sourceMappingURL=menuStore.d.mts.map