export const __rspack_esm_id=21111;export const __rspack_esm_ids=[21111];export const __webpack_modules__={70570(t,i,s){s.a(t,async function(t,n){try{s.r(i);var a=s(15697),e=s(57527),o=s(79224),r=s(98747),h=s(96682),c=s(52699),_=s(72441),g=s(59366),u=s(58178),p=t([r,g,u]);[r,g,u]=p.then?(await p)():p;class l extends e.WF{setConfig(t){if(!t)throw new Error("Invalid configuration");this._config=t}shouldUpdate(t){return(0,_.LX)(this,t)}render(){if(!this._config||!this.hass)return e.s6;const t=this.hass.states[this._config.entity];return t?e.qy` <hui-generic-entity-row .hass=${this.hass} .config=${this._config}> <ha-button appearance="plain" size="s" @click=${this._pressButton} .disabled=${t.state===h.Hh}> ${this.hass.localize("ui.card.button.press")} </ha-button> </hui-generic-entity-row> `:e.qy` <hui-warning .hass=${this.hass}> ${(0,u.j)(this.hass,this._config.entity)} </hui-warning> `}async _pressButton(t){t.stopPropagation(),this._config?.confirmation&&!await(0,c.f)(this,this.hass,this._config.confirmation,this.hass.localize("ui.card.button.press"))||this.hass.callService("button","press",{entity_id:this._config.entity})}}l.styles=e.AH`ha-button:last-child{margin-right:-.57em;margin-inline-start:initial;margin-inline-end:-.57em}`,(0,a.Cg)([(0,o.MZ)({attribute:!1})],l.prototype,"hass",void 0),(0,a.Cg)([(0,o.wk)()],l.prototype,"_config",void 0),l=(0,a.Cg)([(0,o.EM)("hui-button-entity-row")],l),n()}catch(t){n(t)}})}};
//# sourceMappingURL=21111.6879fe21b891265b.js.map