import { ElementRef } from '@angular/core'; import { Observable, BehaviorSubject } from 'rxjs'; import { SimpleModalOptions } from './simple-modal-options'; export interface OnDestroyLike { ngOnDestroy(): void; [key: string]: any; } /** * Abstract modal * @template T - modal data; * @template T1 - modal result */ export declare abstract class SimpleModalComponent { /** * Observer to return result from modal */ private observer; /** * Drag handle */ handle: ElementRef | undefined; /** * Dialog result * @type {T1} */ result: T1; /** * Dialog wrapper (modal placeholder) */ wrapper: ElementRef; /** * ref of options for this component */ options: SimpleModalOptions; /** * ready$ is when all animations and focusing have comleted */ _ready$: BehaviorSubject; /** * Callback to the holders close function */ private closerCallback; /** * Constructor */ constructor(); /** * Maps your object passed in the creation to fields in your own Dialog classes * @param {T} data */ mapDataObject(data: T): void; /** * Setup observer * @return {Observable} */ setupObserver(): Observable; /** * Defines what happens when close is called - default this * will just call the default remove modal process. If overridden * must include * @param callback */ onClosing(callback: (component: SimpleModalComponent) => Promise): void; /** * Closes modal */ close(): Promise; /** * keypress binding ngx way * @param evt */ onKeydownHandler(evt: KeyboardEvent): void; readonly ready$: Observable; markAsReady(): void; }