import type { Popover } from "./Popover"; /** * Manages a stack of popovers to control their order and lifecycle. * This class allows adding, removing, and retrieving popovers * while maintaining their stacking behavior. * */ declare class PopoverStack { /** * Stack to maintain the order of popovers * @internal */ private stack; /** * Adds a popover to the stack * * @param popover - Popover instance */ push(popover: Popover): void; /** * Removes the last popover from the stack * * @returns The last popover in the stack */ pop(): Popover | undefined; removeItem(popover: Popover): void; /** * Returns the last popover in the stack * without removing it * * @returns The last popover in the stack */ peek(): Popover | undefined; /** * Removes a popover from the stack * * @param popover - Popover instance */ remove(popover: Popover): void; /** * Clears the stack */ clear(): void; /** * Determines if the currentPopover should defer closing to the topmost popover * in the case of an outside click, based on nesting. * * @param currentPopover - The popover instance being checked. * @returns True if the currentPopover is nested with the top popover and is not the top itself, * meaning it should defer closing. False otherwise. */ shouldDeferToTopForOutsideClick(currentPopover: Popover): boolean; } export declare const popoverStack: PopoverStack; export {};