import { Component, Inject, OnInit } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { NanoDialogBase } from '../nano-base-dialog';
import { DialogData } from '../new-group-dialog/new-group-dialog.component';

@Component({
  selector: 'app-delete-group-dialog',
  templateUrl: './delete-group-dialog.component.html',
  styleUrls: ['./delete-group-dialog.component.scss']
})
export class DeleteGroupDialogComponent extends NanoDialogBase<DeleteGroupDialogComponent> implements OnInit {

  constructor(
    public dialogRef: MatDialogRef<DeleteGroupDialogComponent>,
    @Inject(MAT_DIALOG_DATA) public data: DialogData) {
      super(dialogRef);
    }

  onNoClick(): void {
    this.dialogRef.close();
  }

  ngOnInit(): void {
  }

  onSubmit(){
    this.dialogRef.close(this.data);
  }

}
