import { TemplateRef, Type } from '@angular/core';
import { Observable } from 'rxjs';
import { ConfirmDialogContext } from '../confirm/confirm.component';
import { DialogContent } from './dialog-content';
import { DialogEvent, DialogOptions, DialogResult, DialogSize } from './dialog-types';
import * as i0 from "@angular/core";
/**
 * 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 {
    /**
     * Emits DialogEvents when the dialog opens or closes.
     */
    events: Observable<DialogEvent>;
    /**
     * 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 lastValueFrom(this.dialogService.openDialog(MyComponent, 'small', myContext, options));
          // 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>>;
    /**Close whatever dialog was most recently opened, with the provided result.
     * The result must be in a form the caller can expect (must match the dialog) so use this carefully
     * if you are returning any result other than cancel. It is most useful if you are opening
     * a dialog with a template reference instead of a true dialog child component
     */
    closeLatestDialog<T>(result: DialogResult<T>): void;
    /**
     * Open a Confirmation Dialog with the given context
     */
    confirm(context: ConfirmDialogContext): Observable<DialogResult<ConfirmDialogContext>>;
    triggerEvent(event: DialogEvent): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
}
