import { Component , Inject , OnInit } from "@angular/core" ; import { MAT_DIALOG_DATA , MatDialogRef } from "@angular/material" ; import { ConfirmDialogDataModel } from "./confirm-dialog-data.model" ; @ Component ( { selector : "app-confirm-dialog" , templateUrl : "./confirm-dialog.component.html" , styleUrls : [ "./confirm-dialog.component.scss" ] } ) export class ConfirmDialogComponent implements OnInit { public static readonly MAX_WIDTH : string = "80%" ; public static readonly MIN_WIDTH : string = "40%" ; constructor ( public dialogRef , @ Inject ( MAT_DIALOG_DATA ) public dialogData ) { } public ngOnInit ( ) { } public onConfirm ( ) { this . dialogRef . close ( true ) ; } public onCancel ( ) { this . dialogRef . close ( false ) ; } }