import { Subject } from 'rxjs'; /** * Dynamic Dialog instance. * @group Components */ export class DynamicDialogRef { constructor() { } /** * Closes dialog. * @group Method */ close(result) { this._onClose.next(result); setTimeout(() => { this._onClose.complete(); }, 1000); } /** * Destroys the dialog instance. * @group Method */ destroy() { this._onDestroy.next(null); } /** * Callback to invoke on drag start. * @param {MouseEvent} event - Mouse event. * @group Method */ dragStart(event) { this._onDragStart.next(event); } /** * Callback to invoke on drag end. * @param {MouseEvent} event - Mouse event. * @group Method */ dragEnd(event) { this._onDragEnd.next(event); } /** * Callback to invoke on resize start. * @param {MouseEvent} event - Mouse event. * @group Method */ resizeInit(event) { this._onResizeInit.next(event); } /** * Callback to invoke on resize start. * @param {MouseEvent} event - Mouse event. * @group Method */ resizeEnd(event) { this._onResizeEnd.next(event); } /** * Callback to invoke on dialog is maximized. * @param {*} value - Size value. * @group Method */ maximize(value) { this._onMaximize.next(value); } _onClose = new Subject(); /** * Event triggered on dialog is closed. * @group Events */ onClose = this._onClose.asObservable(); _onDestroy = new Subject(); /** * Event triggered on dialog instance is destroyed. * @group Events */ onDestroy = this._onDestroy.asObservable(); _onDragStart = new Subject(); /** * Event triggered on drag start. * @param {MouseEvent} event - Mouse event. * @group Events */ onDragStart = this._onDragStart.asObservable(); _onDragEnd = new Subject(); /** * Event triggered on drag end. * @param {MouseEvent} event - Mouse event. * @group Events */ onDragEnd = this._onDragEnd.asObservable(); _onResizeInit = new Subject(); /** * Event triggered on resize start. * @param {MouseEvent} event - Mouse event. * @group Events */ onResizeInit = this._onResizeInit.asObservable(); _onResizeEnd = new Subject(); /** * Event triggered on resize end. * @param {MouseEvent} event - Mouse event. * @group Events */ onResizeEnd = this._onResizeEnd.asObservable(); _onMaximize = new Subject(); /** * Event triggered on dialog is maximized. * @param {*} value - Size value. * @group Events */ onMaximize = this._onMaximize.asObservable(); /** * Event triggered on child component load. * @param {*} value - Chi. * @group Events */ onChildComponentLoaded = new Subject(); } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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YmFjayB0byBpbnZva2Ugb24gZHJhZyBzdGFydC5cbiAgICAgKiBAcGFyYW0ge01vdXNlRXZlbnR9IGV2ZW50IC0gTW91c2UgZXZlbnQuXG4gICAgICogQGdyb3VwIE1ldGhvZFxuICAgICAqL1xuICAgIGRyYWdTdGFydChldmVudDogTW91c2VFdmVudCkge1xuICAgICAgICB0aGlzLl9vbkRyYWdTdGFydC5uZXh0KGV2ZW50KTtcbiAgICB9XG4gICAgLyoqXG4gICAgICogQ2FsbGJhY2sgdG8gaW52b2tlIG9uIGRyYWcgZW5kLlxuICAgICAqIEBwYXJhbSB7TW91c2VFdmVudH0gZXZlbnQgLSBNb3VzZSBldmVudC5cbiAgICAgKiBAZ3JvdXAgTWV0aG9kXG4gICAgICovXG4gICAgZHJhZ0VuZChldmVudDogTW91c2VFdmVudCkge1xuICAgICAgICB0aGlzLl9vbkRyYWdFbmQubmV4dChldmVudCk7XG4gICAgfVxuICAgIC8qKlxuICAgICAqIENhbGxiYWNrIHRvIGludm9rZSBvbiByZXNpemUgc3RhcnQuXG4gICAgICogQHBhcmFtIHtNb3VzZUV2ZW50fSBldmVudCAtIE1vdXNlIGV2ZW50LlxuICAgICAqIEBncm91cCBNZXRob2RcbiAgICAgKi9cbiAgICByZXNpemVJbml0KGV2ZW50OiBNb3VzZUV2ZW50KSB7XG4gICAgICAgIHRoaXMuX29uUmVzaXplSW5pdC5uZXh0KGV2ZW50KTtcbiAgICB9XG4gICAgLyoqXG4gICAgICogQ2FsbGJhY2sgdG8gaW52b2tlIG9uIHJlc2l6ZSBzdGFydC5cbiAgICAgKiBAcGFyYW0ge01vdXNlRXZlbnR9IGV2ZW50IC0gTW91c2UgZXZlbnQuXG4gICAgICogQGdyb3VwIE1ldGhvZFxuICAgICAqL1xuICAgIHJlc2l6ZUVuZChldmVudDogTW91c2VFdmVudCkge1xuICAgICAgICB0aGlzLl9vblJlc2l6ZUVuZC5uZXh0KGV2ZW50KTtcbiAgICB9XG4gICAgLyoqXG4gICA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