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

@Component({
  selector: 'app-cad-dialog',
  templateUrl: './cad-dialog.component.html',
  styleUrls: ['./cad-dialog.component.css']
})
export class CadDialogComponent{

  
  constructor(
    private router: Router,
    public dialogRef: MatDialogRef<CadDialogComponent>,
    @Inject(MAT_DIALOG_DATA) public data: any
  ) {}
  
  onClose(): void {
    this.dialogRef.close();
  }
  onExit(): void {
    this.router.navigate(['/homePrivada']);
  }
}
