import { ComponentFactoryResolver, ComponentRef, EventEmitter, Type, ViewContainerRef, TemplateRef } from '@angular/core';
import { WindowService } from '../../core/window.service';
import { DialogContent } from './dialog-content';
import { DialogSize, DialogOptions, DialogResult } from './dialog-types';
import { DialogService } from './dialog.service';
import * as i0 from "@angular/core";
/** These values need to be kept in sync with dialog-base.scss */
export declare const DialogOpenDuration: number;
export declare const DialogCloseDuration: number;
export declare const PanelOpenDuration: number;
export declare const PanelCloseDuration: number;
export declare class DialogComponent {
    private componentFactoryResolver;
    private windowService;
    private dialogService;
    private documentRef;
    /**
     * Add/remove the is-open css class to the host element when the dialog is opened/closed.
     * Styles use the is-open class to show/hide the dialog.
     */
    isOpen: boolean;
    /**
     * Add the fade-in css class to the host element when the dialog is opening. Remove when transition is complete.
     * Styles use the fade-in class to apply a fade-in transition while the dialog is opening.
     */
    fadeIn: boolean;
    /**
     * Add the fade-out css class to the host element when the dialog is closing. Remove when transition is complete.
     * Styles use the fade-out class to apply a fade-out transition while the dialog is closing.
     */
    fadeOut: boolean;
    displayAsPanel: boolean;
    alignToTop: boolean;
    alignToTopMargin?: string;
    transparentMask: boolean;
    noMask: boolean;
    onOverlayClick(event: MouseEvent): void;
    /**
     * Defines the width of the dialog (height is auto). Can be a number that will be converted to pixels, or xsmall(320px), small(480px), medium(640px), or large(1024px)
     */
    set size(value: DialogSize);
    get size(): DialogSize;
    /**
     * Defines the width of the dialog (height is auto). Can be a number that will be converted to pixels, or xsmall(320px), small(480px), medium(640px), or large(1024px)
     */
    private _size;
    /**
     * Bound to the host. The classes set the --ec-dialog-width variable to our default 'small', 'medium', etc. sizes.
     * Undefined when the size is a number, which is used for custom sizes.
     */
    dialogSizeClass?: string;
    content?: Type<DialogContent<any>> | TemplateRef<any>;
    context?: any;
    options?: DialogOptions;
    /**Only set if this particular instance of a dialog should be identified separately from others.
     * If provided, this is emitted to the dialog service with OpenEnd and Close events. Direct usage
     * of the DialogComponent from outside a DialogGroup does not usually require using this parameter as
     * the dialog reference itself functions as the identifier
     */
    dialogOpenStartEventId?: string;
    /**
     * Emits an event when the dialog is opened
     */
    opened: EventEmitter<string>;
    /**
     * Emits an event when the dialog is closed
     */
    closed: EventEmitter<DialogResult<any>>;
    /**
     * The container where the component will be loaded
     */
    contentContainer: ViewContainerRef;
    /**
     * Custom width of the dialog in pixels. Set by defining the size property
     * as a number value.
     */
    width?: number;
    /**
     * Custom min-width of the dialog. Only takes effect if size is set to dynamic.
     * Must include units, i.e. "32rem" or "640px"
     */
    minWidth?: string;
    /**
     * A reference of the component once it has been loaded
     */
    componentRef?: ComponentRef<any>;
    private previouslyFocusedElement;
    constructor(componentFactoryResolver: ComponentFactoryResolver, windowService: WindowService, dialogService: DialogService, documentRef: Document);
    ngOnInit(): void;
    ngOnDestroy(): void;
    /**
     * Clear and previously loaded content
     * Load the component
     * Save a reference of the loaded component
     * Show the dialog and fade in
     */
    open<T>(component: Type<DialogContent<T>> | TemplateRef<any>, context?: T, options?: DialogOptions): Promise<void>;
    /**
     * Fade the dialog out and hide
     */
    close<T>(result?: DialogResult<T>): void;
    /**Open the dialog and attach handlers to the cancel and save events to close it and notify the hosting page */
    private openDialogComponent;
    /**
     * Reset options so they don't persist next time the
     * root dialog is opened
     * @deprecated
     */
    private resetOptions;
    /** If they turned on closeOnResize, automatically close the dialog any time somebody resizes the window.
      * This is useful for responsive layouts to prevent having the dialogContent on the screen twice */
    private handleCloseOnResize;
    /**Extract the dialogId from the dialog content, if it has one. Template-based dialogs generally don't.
     * We fall back to empty string to allow anybody listening for dialogEvents to still record the open/close even if
     * the dialog itself does not say what the name is.
     */
    private getDialogId;
    static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "ec-dialog", never, { "size": { "alias": "size"; "required": false; }; "content": { "alias": "content"; "required": false; }; "context": { "alias": "context"; "required": false; }; "options": { "alias": "options"; "required": false; }; "dialogOpenStartEventId": { "alias": "dialogOpenStartEventId"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
}
