import { TemplateRef, Type } from '@angular/core';
import { DialogContent } from './dialog-content';
/**A base class from which all dialog events extend. This class models the dialog actions very much
 * like the Angular RouterEvents.
 */
export declare class DialogEvent {
    /**A unique value representing this particular instance of the event, used to match open and close events together */
    eventId?: string | undefined;
    /**The ID of the dialog itself, typically matching the DialogContent. Something like "DeleteConfirmation" or "EditReading" etc.
     * Useful for telemetry logging to track users opening and closing dialogs
    */
    dialogId: string;
    /** The action the dialog event represents. Can also be determined by using the class of the event with the
     * instanceof operator.
     */
    dialogAction: 'openStart' | 'open' | 'close' | 'closeLatest';
    constructor(
    /**A unique value representing this particular instance of the event, used to match open and close events together */
    eventId?: string | undefined, 
    /**The ID of the dialog itself, typically matching the DialogContent. Something like "DeleteConfirmation" or "EditReading" etc.
     * Useful for telemetry logging to track users opening and closing dialogs
    */
    dialogId?: string, 
    /** The action the dialog event represents. Can also be determined by using the class of the event with the
     * instanceof operator.
     */
    dialogAction?: 'openStart' | 'open' | 'close' | 'closeLatest');
}
/**Emitted when the dialog open has been triggered, but the dialog itself hasn't initialized yet.
 * This event creates its own unique identifier so that that particular instance of the dialog can be found
 * when closed later on. The context is used to fill the dialog itself, and may include state or callbacks.
 * Various options are available to change the dialog appearance. These events are generally created
 * by the @see DialogService.open() call
 */
export declare class DialogOpenStartEvent<T> extends DialogEvent {
    content: Type<DialogContent<T>> | TemplateRef<any>;
    context?: T | undefined;
    options?: DialogOptions | undefined;
    constructor(content: Type<DialogContent<T>> | TemplateRef<any>, context?: T | undefined, options?: DialogOptions | undefined);
}
/**Emitted when the dialog has finished opening and been properly initialized. It includes
 * the eventId, which uniquely identifies the particular instance of the dialog open event so that we can
 * close that specific dialog later on. The dialogId can be used for telemetry, and may be set to something
 * like "Confirm Delete" or "Edit Reading" etc.
 */
export declare class DialogOpenEndEvent extends DialogEvent {
    constructor(eventId?: string, dialogId?: string);
}
/**Emitted when the dialog close has completed and a result is available. Check result.save to know if the dialog change
 * was committed (true) or cancelled (false). Cancel can be set if the dialog was automatically closed by clicking in the
 * background or resizing the window when using the panel view or closeOnResize.
 */
export declare class DialogCloseEvent<T> extends DialogEvent {
    /**The result of the dialog event, including weather it was saved or cancelled and the context's final state*/
    dialogResult: DialogResult<any>;
    constructor(eventId?: string, dialogId?: string, save?: boolean, context?: T);
}
/**Used to tell the dialog group to close whatever dialog was opened most recently with the given result
 * This allows a TemplateRef based panel (that's not coming from DialogComponent) to close itself or
 * an external process to close a dialog that is open
 */
export declare class DialogCloseLatestEvent<T> extends DialogEvent {
    /**The result of the dialog event, including weather it was saved or cancelled and the context's final state*/
    dialogResult: DialogResult<any>;
    constructor(result: DialogResult<T>);
}
/**
 * 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;
    /** Set the dialog mask color to transparent. Defaults to true when dialog is displayed as a panel */
    transparentMask?: boolean;
    /**
     * Set the dialog mask to not display at all. Allows the user to click on elements behind the dialog.
     * Only applicable when displayAsPanel is true.
     * Defaults to false.
     */
    noMask?: boolean;
    /** Align the dialog window to the top instead of centered. */
    alignToTop?: boolean;
    /** Set the top margin of the dialog window. Only takes effect if alignToTop is true.
     * Must include units, i.e. "32rem" or "10vh"
     */
    alignToTopMargin?: string;
    /**
     * 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;
    size?: DialogSize;
    /**
     * Used to specify a 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;
}
/**
 * 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);
}
/** Options for size of dialog */
export type DialogSize = number | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full' | 'dynamic';
/**
 * Dialog Animation Events:
 * - BeginClose: When the close animation starts.
 * - EndClose: When the close animation finishes
 */
export type DialogAnimationEvent = 'BeginClose' | 'EndClose';
