export type PopupStore = { /** A popup whose delay has passed asks to open. It opens at once if nothing is open, otherwise it waits its turn. */ request: (key: string, order: number) => void; /** Editor: opens the popup at once, closing the open one. */ show: (key: string) => void; /** The popup was closed or unmounted: it leaves the store and the next waiting popup opens. */ release: (key: string) => void; getOpenKey: () => string | null; subscribe: (listener: () => void) => () => void; }; /** * One popup open at a time. Waiting popups open by `order`, then by the time they asked; an open popup is never * replaced, whatever its order. When nothing is open, a request waits one `schedule` tick before a popup opens, so * popups that ask at the same moment (e.g. the same delay) are compared by `order` too. */ export declare function createPopupStore(schedule?: (run: () => void) => void): PopupStore; /** Shared by every `Composer` on the page (header, main, footer, ...), so only one popup is open across all of them. */ export declare const popupStore: PopupStore;