import { Observable } from 'rxjs'; import { DatoPanelOptions, DatoPanelResult } from './panel.types'; import { beforeClosedDelegate } from '../types/public_api'; export declare class DatoPanelRef { private readonly panelOptions; private _onClose; private _onDestroy; private _result; /** * Will be used for disable the closing */ private _beforeClose; /** This indication helps knowing that the observable is finished because we don't want to invoke it per close click */ private beforeCloseFinished; get $destroyed(): Observable; get options(): DatoPanelOptions; get data(): any; constructor(panelOptions: DatoPanelOptions); /** * Closing the panel, passing an optional result. * @param result * @return whether the panel has been closed, or aborted. */ close(result?: R): void; /** * Register a handler function to be invoked just before the panel closed. * The handler should return a boolean/Observable indicates if the panel can be closed. * @param {beforeClosedDelegate} fn */ beforeClosed(fn: beforeClosedDelegate): this; /** * Gets an observable that is notified when the panel is finished closing. */ afterClosed(): Observable; _destroy(): void; /** * Check and close the panel * @param {DatoPanelResult} result */ _tryClose(result: DatoPanelResult): Observable; /** * Check if the panel can be closed * @param result * @return {Observable} */ private canClose; }