import { Component, OnInit, Inject } from '@angular/core';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';

import { EvaluationData } from '../../../structures/evaluation-data';

import { emptyEvaluationDataFactory } from '../../../empty-objects/empty-evaluation-data';

import * as Globals from '../../../globals';


@Component({
  selector: 'app-edit-instructor-evaluation-dialog',
  templateUrl: './edit-instructor-evaluation-dialog.component.html',
  styleUrls: ['./edit-instructor-evaluation-dialog.component.scss']
})
export class EditInstructorEvaluationDialogComponent implements OnInit {

  evaluation: EvaluationData = emptyEvaluationDataFactory();

  name: string = '';

  constructor(public dialogRef: MatDialogRef<EditInstructorEvaluationDialogComponent>, 
    @Inject(MAT_DIALOG_DATA) public data: { evaluation: EvaluationData, name: string }) {

    this.evaluation = data.evaluation;
    this.name = data.name;
  }

  ngOnInit(): void {
  }

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