import { Component, EventEmitter, Input, Output } from '@angular/core'; import { BUTTON_STYLE } from '../../enum/button-style.enum'; import { Action } from '../../interface/action.interface'; @Component({ selector: 'kit-toolbar-action', templateUrl: './toolbar-action.component.html', }) export class ToolbarActionComponent { // identifier of this element @Input() public action!: Action; // output to notify changes @Output() public toolbarAction: EventEmitter = new EventEmitter(); public BUTTON_STYLE = BUTTON_STYLE; constructor() {} public onAction() { this.toolbarAction.emit(this.action.id); } }