import{type OverlayOrderReservation}from'./overlay-order.js';type OverlayResourceRelease=()=>void;type OverlayStackRestoreFocusTarget=HTMLElement|null|(()=>HTMLElement|null);interface OverlayStackDeactivateOptions{restoreFocus?:boolean;deferScrollLockRelease?:boolean;}export interface OverlayStackHandle{focusInitial():void;focusAutofocus():boolean;updateRestoreFocusTo(target:OverlayStackRestoreFocusTarget):void;deactivate(options?:OverlayStackDeactivateOptions):(()=>void)|undefined;suspend():void;resume():void;isTopmost():boolean;isActive():boolean;dismissBackdrop():boolean;}export interface OverlayStackActivationOptions{host:HTMLElement;panel:()=>HTMLElement|null;modalRoot?:()=>HTMLElement|null;onEscape:()=>void;onBackdrop?:()=>void;preferredInitialFocus?:()=>HTMLElement|null;beforeInitialFocus?:()=>boolean;restoreFocusTo?:OverlayStackRestoreFocusTarget;onTab?:()=>void;initiallySuspended?:boolean;orderReservation?:OverlayOrderReservation;modal:boolean;trapFocus:boolean;onRegistered?:(document:Document)=>void;onUnregistered?:(document:Document,deferResourceRelease:boolean)=>OverlayResourceRelease|undefined;onDeactivate?:()=>void;}export interface OverlayStackEntrySnapshot{readonly host:HTMLElement;readonly modal:boolean;readonly modalRoot?:()=>HTMLElement|null;}export interface OverlayStackSnapshot{readonly entries:readonly OverlayStackEntrySnapshot[];}type OverlayStackObserver=(snapshot:OverlayStackSnapshot)=>void; /** Returns the deepest focused descendant across open shadow roots, or `null` when no document * exists in the current realm. */ export declare function deepActiveElement(doc?:Document|null|undefined):Element|null;export declare function composedContains(container:Element,candidate:Element|null):boolean; /** Collects rendered focus targets through slots and nested open shadow roots in browser tab order. */ export declare function collectFocusableElements(root:Element|ShadowRoot):HTMLElement[]; /** * Collects every `[autofocus]` element inside `root`, walking slots and nested open shadow roots * exactly as the focusable collector does. `autofocus` is a global attribute, so it is honoured on * a custom element host as readily as on a native control. */ export declare function collectAutofocusElements(root:Element|ShadowRoot):HTMLElement[]; /** Observes the shared stack without making modal machinery part of a nonmodal import graph. */ export declare function observeOverlayStack(doc:Document,observer:OverlayStackObserver):()=>void; /** Suspends Escape/Tab ownership while an external modal owns the document. */ export declare function acquireOverlayRoutingSuspension(doc:Document):()=>void; /** * Adds an overlay to a stack scoped to its own `ownerDocument`. One document * listener routes Escape and Tab only to the top entry, while modal inerting, * visual stack depth, and focus return are recomputed as entries move. */ export declare function activateOverlayStack(options:OverlayStackActivationOptions):OverlayStackHandle;export{};