import{html as t,css as e,LitElement as a}from"../../../lit/index.js";import{HaxToolbarItemBehaviors as n}from"./hax-toolbar-item.js";class HaxButton extends(n(a)){static get tag(){return"hax-tray-button"}constructor(){super(),this.eventData=null}static get properties(){return{...super.properties,voiceCommand:{type:String,attribute:"voice-command"},wide:{type:Boolean,reflect:!0},index:{type:Number},eventData:{type:String,attribute:"event-data"}}}_voiceEvent(t){this._handleClick(t),this.click()}_handleClick(t){this.dispatchEvent(new CustomEvent("hax-tray-button-click",{bubbles:!0,cancelable:!0,composed:!0,detail:{eventName:this.eventName,index:this.index,value:this.eventData}}))}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{"voiceCommand"==e&&this.dispatchEvent(new CustomEvent("super-daemon-voice-command",{bubbles:!0,composed:!0,cancelable:!1,detail:{command:this[e],context:this,callback:"_voiceEvent"}}))}))}}customElements.define(HaxButton.tag,HaxButton);export{HaxButton};