import { ComponentRef, EmbeddedViewRef, ElementRef, OnInit } from '@angular/core'; import { BasePortalOutlet, ComponentPortal, CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal'; import { OuiDialogConfig } from './dialog-config'; import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y'; import * as i0 from "@angular/core"; /** * Throws an exception for the case when a ComponentPortal is * attached to a DomPortalOutlet without an origin. * * @docs-private */ export declare function throwOuiDialogContentAlreadyAttachedError(): void; /** * Internal component that wraps user-provided dialog content. * * @docs-private */ export declare class OuiDialogContainer extends BasePortalOutlet implements OnInit { private _focusTrapFactory; _config: OuiDialogConfig; elementRef: ElementRef; private _document; /** The portal outlet inside of this container into which the dialog content will be loaded. */ _portalOutlet: CdkPortalOutlet; /** The class that traps and manages focus within the dialog. */ private _focusTrap; /** Element that was focused before the dialog was opened. Save this to restore upon close. */ private _elementFocusedBeforeDialogWasOpened; /** ID of the element that should be considered as the dialog's label. */ _ariaLabelledBy: string | null; /** ID for the container DOM element. */ _id: string; constructor(_focusTrapFactory: ConfigurableFocusTrapFactory, _config: OuiDialogConfig, elementRef: ElementRef, _document: Document); ngOnInit(): void; private _addMarginForDefaultScroll; /** * Attach a ComponentPortal as content to this dialog container. * * @param portal Portal to be attached as the dialog content. */ attachComponentPortal(portal: ComponentPortal): ComponentRef; /** * Attach a TemplatePortal as content to this dialog container. * * @param portal Portal to be attached as the dialog content. */ attachTemplatePortal(portal: TemplatePortal): EmbeddedViewRef; /** Moves the focus inside the focus trap. */ _trapFocus(): void; /** Restores focus to the element that was focused before the dialog opened. */ _restoreFocus(): void; /** * Dynamically adds or removes focus from the dialog container. * * @param addFocus Whether to add focus (true) or remove focus (false). */ _toggleFocus(addFocus: boolean): void; /** * Setting up the focus trap and saves a reference to the element that was focused before the dialog was open. */ private _addFocusTrap; /** Only return when there is focus inside the dialog */ private _containsFocus; /** * Removes the focus trap from the dialog. * This method is called to clean up resources and ensure the dialog no longer traps focus. */ private _removeFocusTrap; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } //# sourceMappingURL=dialog-container.d.ts.map