export const __rspack_esm_id="19825";export const __rspack_esm_ids=["19825"];export const __webpack_modules__={46472(t,i,s){s.a(t,async function(t,n){try{s.r(i);var a=s(62826),e=s(96196),o=s(97735),r=s(18350),h=s(22675),c=s(99936),u=s(784),_=s(79757),g=s(85979),p=t([r,_,g]);[r,_,g]=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,u.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="small" @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,g.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("input_button","press",{entity_id:this._config.entity})}}l.styles=e.AH`ha-button:last-child{margin-right:-.57em;margin-inline-end:-.57em;margin-inline-start:initial}`,(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-input-button-entity-row")],l),n()}catch(t){n(t)}})}};
//# sourceMappingURL=19825.3245728add580a30.js.map