import { ComponentFactoryResolver, ComponentRef, EventEmitter, Type, ViewContainerRef, TemplateRef } from '@angular/core';
import { DialogContent } from './dialog-content';
/** 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;
/** Options for size of dialog */
export declare type DialogSize = number | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full';
/**
 * Dialog Animation Events:
 * - BeginClose: When the close animation starts.
 * - EndClose: When the close animation finishes
 */
export declare type DialogAnimationEvent = 'BeginClose' | 'EndClose';
/**
 * This interface specifies extra options to configure behavior of the Dialog Component
 */
export interface DialogOptions {
    /**
     * Function to execute before dialog opens.  Leave `undefined` or return true to allow
     * dialog to open.
     *
     * Can be used to check for unsaved changes on the underlying page before opening.
     *
     * @example
       constructor( private unsavedChangesGuard: CanDeactivateUnsavedChangesGuard ){};
       //...
       const options: DialogOptions = { canOpenDialog: this.unsavedChangesGuard.canDeactivate };
     */
    canOpenDialog?: () => Promise<boolean>;
    /** Configures when the dialog emits its result in relation to a closing animation event */
    emitResultOn?: DialogAnimationEvent;
    /** Display the dialog as a side panel that slides in */
    displayAsPanel?: boolean;
    /** Align the dialog window to the top instead of centered. */
    alignToTop?: boolean;
    /**
     * Set to true if the dialog should automatically close when the window is resized.
     * This is useful if you are conditionally showing/hiding the dialog content as a static part of the page
     * when the screen gets wide enough
     */
    closeOnResize?: boolean;
}
/**
 * Returned when a dialog is closed.
 * Specifies if the dialog was saved and contains an optional context.
 */
export declare class DialogResult<T> {
    save: boolean;
    context?: T | undefined;
    constructor(save: boolean, context?: T | undefined);
}
export declare class DialogComponent {
    private componentFactoryResolver;
    /**
     * 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;
    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)
     */
    size: DialogSize;
    /**
     * Emits an event when the dialog is opened
     */
    opened: EventEmitter<void>;
    /**
     * 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;
    /**
     * A reference of the component once it has been loaded
     */
    componentRef?: ComponentRef<any>;
    constructor(componentFactoryResolver: ComponentFactoryResolver);
    /**
     * 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
     */
    private resetOptions;
}
