import { Injectable } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';

@Injectable({
  providedIn: 'root'
})
export class ValidationsService {

  constructor(
    private _MatSnackBar: MatSnackBar
  ) { }

  openSnackBar(message: string, action: string = "Cerrar", timer: number = 7000) {
    this._MatSnackBar.open(message, action, {
      duration: timer
    });
  }

}
