import { CommonModule } from '@angular/common';
import { Component, Inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { NzButtonModule } from 'ng-zorro-antd/button';

@Component({
  selector: 'app-comp-comfirm-dialog',
  standalone:true,
  imports:[ 
    CommonModule,
    MatButtonModule,
    MatDialogModule,
    NzButtonModule,
  ],
  templateUrl: './comp-comfirm-dialog.component.html',
  styleUrls: ['./comp-comfirm-dialog.component.scss']
})
export class CompComfirmDialogComponent {
  constructor(
    public dialogRef: MatDialogRef<CompComfirmDialogComponent>,
    @Inject(MAT_DIALOG_DATA) public data: {
      title:string|null,
      message:string|null,
      mode?:string|null,
      danger?:boolean|null,
    },
  ){
  }
  confirm(result:any){
    this.dialogRef.close(result)
  }

}
