import { Disposable } from "../../base/common/lifecycle.js"; import { Event } from "../../base/common/event.js"; export type MobileNavigationLayer = "sidebar" | "editor" | "panel" | "auxbar" | "customView"; /** * Manages a stack of open overlay layers (sidebar, editor modal, panel sheet, * aux bar) and integrates with `history.pushState` / `popstate` so that the * Android back button dismisses overlays in LIFO order. */ export declare class MobileNavigationStack extends Disposable { private readonly _stack; private _nextId; private readonly _onDidPop; readonly onDidPop: Event; constructor(); push(layer: MobileNavigationLayer): void; pop(): MobileNavigationLayer | undefined; peek(): MobileNavigationLayer | undefined; has(layer: MobileNavigationLayer): boolean; clear(): void; /** * Removes the topmost entry matching `layer` from the stack (without * firing {@link onDidPop}) and rewinds the browser history by one entry. * Use this when a layer is closed by UI interaction (e.g., backdrop click) * so the history and stack stay in sync without recursing back into * close handlers. * * Concurrent silent pops are handled via a counter: each call increments * {@link _pendingSilentPops} and the matching {@link _onPopState} decrements * it, so rapid back-button taps or multiple overlay closes cannot leak * suppression state across unrelated pops. */ popSilently(layer: MobileNavigationLayer): void; private _pendingSilentPops; private _onPopState; }