import { Component, Inject, OnInit } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { DriveFile } from 'src/app/components/resource-page/drive-window/drive-layout/drive-file';
import { NanoDialogBase } from '../nano-base-dialog';
import { DialogData } from '../new-group-dialog/new-group-dialog.component';

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

  constructor(
    public dialogRef: MatDialogRef<DeleteFileDialogComponent>,
    @Inject(MAT_DIALOG_DATA) public data: DriveFile[]) {
      super(dialogRef);
    }

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

  ngOnInit(): void {
  }

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

}
