import { ComponentRef, ElementRef, EmbeddedViewRef } from '@angular/core'; import { FocusTrapFactory } from '@angular/cdk/a11y'; import { BasePortalOutlet, ComponentPortal, CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal'; import { Subject } from 'rxjs'; import { MdcDialogConfig } from './dialog-config'; /** * Throws an exception for the case when a ComponentPortal is * attached to a DomPortalOutlet without an origin. */ export declare function throwMdcDialogContentAlreadyAttachedError(): void; export declare class MdcDialogPortal extends BasePortalOutlet { private _elementRef; private _focusTrapFactory; private _document; _config: MdcDialogConfig; _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; /** A subject emitting after the dialog exits the view. */ _afterExit: Subject; /** ID for the container DOM element. */ _id: string; /** * 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; constructor(_elementRef: ElementRef, _focusTrapFactory: FocusTrapFactory, _document: any, _config: MdcDialogConfig); /** Moves the focus inside the focus trap. */ trapFocus(): void; /** Restores focus to the element that was focused before the dialog opened. */ restoreFocus(): void; /** Saves a reference to the element that was focused before the dialog was opened. */ private _savePreviouslyFocusedElement; }