import { Component , Inject } from "@angular/core" ; import { Alert } from "../alert" ; import { MAT_SNACK_BAR_DATA } from "@angular/material/snack-bar" ; /**
 * Display an  Alert with basic formatting and UI controls.
  @ Component ( { templateUrl : "./alert.component.html" , styleUrls : [ "./alert.component.scss" ] , } ) export class AlertComponent { /** the displayed alert */ alert : Alert ; param data constructor ( @ Inject ( MAT_SNACK_BAR_DATA ) private data ) { this . alert = data ; } }