import {Component} from '../../vues6.js' import {ActionService} from '../service/Action.service.js' const template = ` {{ action.title }} ` export class ActionButtonComponent extends Component { static get selector() { return 'cobalt-action-button' } static get template() { return template } static get props() { return ['action', 'format'] } async onClick() { if ( this.action.defer ) { return this.$emit('perform') } await ActionService.get().perform(this.action) } }