import { Injectable } from "@angular/core" ; import { MatDialog , MatDialogRef } from "@angular/material/dialog" ; import { ConfirmationDialogComponent } from "./confirmation-dialog/confirmation-dialog.component" ; /**
 * Inject this service instead of MatDialog if you need a simple, configurable confirmation dialog box
 * to be displayed to the user.
 *
 * Import the  ConfirmationDialogModule in your root module to provide this service.
 *
 *  example @ Injectable ( ) export class ConfirmationDialogService { constructor ( private dialog ) { } param title param text param yesNoButtons return openDialog ( title , text , yesNoButtons = true ) { return this . dialog . open ( ConfirmationDialogComponent , { data : { title : title , text : text , yesNo : yesNoButtons } , } ) ; } }