/** * Owns keyboard focus entry, containment, and restoration for one dialog. */ export declare class DialogFocusScope { private readonly dialogElement; private readonly fallbackElement; private focusableElementsCache; private focusMutationObserver; private restoreTarget; private isActive; private ownsTemporaryFallbackTabIndex; /** * @param dialogElement - Native dialog whose focus is scoped. * @param fallbackElement - Host element used when the original trigger disappears. */ constructor(dialogElement: HTMLDialogElement, fallbackElement: HTMLElement); /** * Captures the external trigger before `showModal()` moves focus. */ captureRestoreTarget(): void; /** * Installs the Tab scope and focuses dialog content after the dialog opens. * * @param contentElement - Newly rendered form or confirmation content. */ activate(contentElement: HTMLElement): void; /** * Focuses the first invalid control or the first interactive content. * * @param contentElement - Current form or confirmation content. */ focusInitial(contentElement: HTMLElement): void; /** * Removes focus containment and optionally restores the opening trigger. * * @param shouldRestore - Whether focus should return outside the dialog. */ deactivate(shouldRestore: boolean): void; /** * Removes the scope without retaining a trigger reference. */ destroy(): void; private focusFallback; private readonly restoreFallbackFocusability; private readonly handleKeyDown; private readonly handleFocusMutations; private affectsFocusableElements; private applyPendingFocusMutations; private getFocusableElements; }