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

@Component({
	selector: 'app-confirm',
	templateUrl: './confirm.component.html',
	styleUrls: ['./confirm.component.css']
})
export class ConfirmComponent implements OnInit {
	title:string;
	text:string;
	labelOK: string;
	labelNOK: string;

	constructor(
		@Inject(MAT_DIALOG_DATA) public data:any,
		public dialogRef: MatDialogRef<ConfirmComponent>
	) {
		this.title = data.title;
		this.text = data.text;
		this.labelOK = data.labelOK;
		this.labelNOK = data.labelNOK;
	}

	ngOnInit(): void {
	}

	sendAnswer(val:boolean): void {
		this.dialogRef.close(val);
	}
}
