import { Component, OnInit } from '@angular/core';
import { CreateApplicationComponent } from 'src/app/applications/create-application/create-application.component';
import { ModalService } from '../../services/modal.service';


@Component({
  selector: 'app-add-application-button',
  template: `
    <button type="button" (click)="onClick()" matTooltip="Add a new application to monitor">
        <mat-icon>add</mat-icon>
        Add
    </button>
  `
})
export class AddApplicationButtonComponent {
  constructor(
    private _modalService: ModalService
  ) {}

  onClick(): void {
    this._modalService.open(CreateApplicationComponent);
  }
}
