1 import {Component, Input, Output, EventEmitter, Host, OnInit} from '@angular/core';
2 import {FmRecordEditorComponent} from './fm-editor.component';
5 selector: 'eg-fm-record-editor-action',
6 template: '<ng-template></ng-template>' // no-op
9 export class FmRecordEditorActionComponent implements OnInit {
14 @Input() label: string;
16 @Input() buttonCss = 'btn-outline-dark';
18 // Emits the 'key' of the clicked action.
19 @Output() actionClick: EventEmitter<string>;
21 @Input() disabled: boolean;
23 constructor(@Host() private editor: FmRecordEditorComponent) {
24 this.actionClick = new EventEmitter<string>();
28 this.editor.actions.push(this);