2 * Created by rc2122 on 6/1/2017.
4 import {Component, Output, EventEmitter, ViewChild} from "@angular/core";
5 import {ButtonsModelMap, ButtonModel} from "app/models/button";
6 import {ModalComponent} from "app/ng2/components/modal/modal.component";
9 selector: 'confirm-delete-input',
10 templateUrl: './confirmation-delete-input.component.html'
12 export class ConfirmationDeleteInputComponent {
14 @Output() deleteInput: EventEmitter<any> = new EventEmitter<any>();
15 @ViewChild ('confirmationModal') confirmationModal:ModalComponent;
16 footerButtons:ButtonsModelMap = {};
22 this.footerButtons['Delete'] = new ButtonModel('Delete', 'blue', this.onDeleteInput);
23 this.footerButtons['Close'] = new ButtonModel('Close', 'grey', this.closeModal);
26 onDeleteInput = (input) => {
27 this.deleteInput.emit(input);
32 this.confirmationModal.open();
36 this.confirmationModal.close();