import { Component, OnInit } from '@angular/core';


@Component({
  selector: 'alerts-preview',
  template: require('./alerts-preview.component.html')
})
export class AlertsPreviewComponent implements OnInit {
  constructor() { }

  ngOnInit() { }

  /*----------------------------------------------------------
   * ALERTS
   *---------------------------------------------------------*/
  public alerts: any[] = [
    {
      type: 'danger',
      msg:  'Oh snap! Change a few things up and try submitting again.'
    },
    {
      type:     'success',
      msg:      'Well done! You successfully read this important alert message.',
      closable: true
    },
    {
      type:     'info',
      msg:      'Well done! You successfully read this important alert message.',
      closable: true
    },
    {
      type:     'warning',
      msg:      'Well done! You successfully read this important alert message.',
      closable: true
    }
  ];

  public closeAlert(i: number): void {
    this.alerts.splice(i, 1);
  }

}
