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


@Component({
  selector: 'app-modal-sair',
  templateUrl: './modal-sair.component.html',
  styleUrls: ['./modal-sair.component.css']
})
export class ModalSairComponent {
  constructor(
    private router: Router,
    public dialogRef: MatDialogRef<ModalSairComponent>,
    @Inject(MAT_DIALOG_DATA) public data: any
  ) {}
  onClose(): void {
    this.dialogRef.close();
  }
  onExit(): void {
    this.router.navigate(['/home']);
    this.dialogRef.close();
  }

}
