import { Component , OnInit , Input } from '@angular/core' ; import { NbDialogRef } from '@nebular/theme' ; import { AlertComponent } from '../alert/alert.component' ; export interface ConfirmDialogOptions { title ? : string ; message ? : string ; yesText ? : string ; noText ? : string ; } @ Component ( { selector : 'ngx-confirm' , templateUrl : './confirm.component.html' , styleUrls : [ './confirm.component.scss' ] } ) export class ConfirmComponent implements OnInit { @ Input ( ) data : ConfirmDialogOptions ; constructor ( private dialogRef ) { } ngOnInit ( ) { } close ( confirm = false ) { this . dialogRef . close ( confirm ) ; } }