import { Type, TemplateRef } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { ConfirmDialogContext } from '../confirm/confirm.component';
import { DialogContent } from './dialog-content';
import { DialogComponent, DialogOptions, DialogSize, DialogResult } from './dialog.component';
import { WindowService } from '../../core/window.service';
export interface DialogEvent {
    dialogId: string;
    dialogAction: 'open' | 'close';
    dialogResult: DialogResult<any> | null;
}
/**
 * Service used to communcate with ng5 dialogs from an ng1 view. Any dialogs that
 * have been added to ng1 views must be added to the DialogCatalog in order
 * to know which component to load inside the dialog. You can also optionally subscribe
 * to an onClose event to do some work after the dialog closes
 */
export declare class DialogService {
    private windowService;
    /**
     * The root dialog located in the AppComponent. Other dialogs can be added to other
     * views but cannot be opened via the dialog service and is considered a deprecated
     * practice.
     */
    rootDialog?: DialogComponent;
    /**
     * @deprecated Prefer 'events' property.
     * Emits the DialogResult when the dialog closes.
     */
    rootDialogClosed: Subject<DialogResult<any>>;
    /**
     * Emits DialogEvents when the dialog opens or closes.
     */
    private _events;
    events: Observable<DialogEvent>;
    constructor(windowService: WindowService);
    /**
     * Open the root dialog.
     * @param content - The component class to load into the dialog
     * @param size - The size of the dialog
     * @param context - optional context to pass to the dialog content during initialization.
     * @param options - extra options to configure the dialog
     * @returns Observable of a typed DialogResult which specifies if the dialog was saved and an optional context.
     * @example
        // From typescript
        try {
          const result = await this.dialogService.openDialog(MyComponent, 'small', myContext, options).toPromise();
          // do something with result
        } catch(error) {
          // do something with error
        }
     */
    openDialog<T>(content: Type<DialogContent<T>> | TemplateRef<any>, size: DialogSize, context?: T, options?: DialogOptions): Observable<DialogResult<T>>;
    /**
     * Open a Confirmation Dialog with the given context
     */
    confirm(context: ConfirmDialogContext): Observable<DialogResult<ConfirmDialogContext>>;
    /**
     * Get delay to use when emitting the dialog result
     */
    private getEmitResultDelay;
}
