import { Injectable } from '@angular/core' ; import { DialogRef , Overlay , DROP_IN_TYPE , Modal as Modal_ } from 'ngx-modialog' ; import { JSNativePresetBuilder } from './presets/js-native-preset' ; @ Injectable ( ) export class Modal extends Modal_ { constructor ( overlay ) { super ( overlay ) ; } alert ( ) { return new JSNativePresetBuilder ( this , DROP_IN_TYPE . alert ) ; } prompt ( ) { return new JSNativePresetBuilder ( this , DROP_IN_TYPE . prompt ) ; } confirm ( ) { return new JSNativePresetBuilder ( this , DROP_IN_TYPE . confirm ) ; } protected create ( dialogRef , type ) { return dialogRef ; } }