import { Component, Inject, OnInit } from "@angular/core";
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
import { TranslateService } from "@ngx-translate/core";
import { NanoDialogBase } from "../nano-base-dialog";

@Component({
  selector: "app-general-confirm-dialog",
  templateUrl: "./general-confirm-dialog.component.html",
  styleUrls: ["./general-confirm-dialog.component.scss"],
})
export class GeneralConfirmDialogComponent
  extends NanoDialogBase<GeneralConfirmDialogComponent>
  implements OnInit
{
  constructor(
    public dialogRef: MatDialogRef<GeneralConfirmDialogComponent>,
    @Inject(MAT_DIALOG_DATA) public generalConfirmData: GeneralConfirmData,
    public translate: TranslateService
  ) {
    super(dialogRef);
  }

  ngOnInit(): void {}

  closeWithOk() {
    this.dialogRef.close(true);
  }
}

interface GeneralConfirmData {
  title: string;
  text: string;
  okButtonText?: string;
  cancelButtonText?: string;
}
