export const __rspack_esm_id=28928;export const __rspack_esm_ids=[28928];export const __webpack_modules__={40882(t,e,i){i.d(e,{},{K:(t,e,i)=>t.callService("text","set_value",{value:i},{entity_id:e})})},96803(t,e,i){i.a(t,async function(t,s){try{i.r(e);var a=i(15697),n=i(57527),h=i(79224),r=i(57406),o=i(96682),c=i(40882),u=i(72441),l=i(59366),_=i(58178),g=t([r,l,_]);[r,l,_]=g.then?(await g)():g;class d extends n.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 n.s6;const t=this.hass.states[this._config.entity];if(!t)return n.qy` <hui-warning .hass=${this.hass}> ${(0,_.j)(this.hass,this._config.entity)} </hui-warning> `;const e=this.hass.formatEntityName(t,this._config.name);return n.qy` <hui-generic-entity-row .hass=${this.hass} .config=${this._config} hide-name> <ha-input .label=${e} .disabled=${t.state===o.Hh} .value=${t.state} .minlength=${t.attributes.min} .maxlength=${t.attributes.max} .autoValidate=${t.attributes.pattern} .pattern=${t.attributes.pattern} .type=${t.attributes.mode} @change=${this._valueChanged} .placeholder=${this.hass.localize("ui.card.text.empty_value")}></ha-input> </hui-generic-entity-row> `}_valueChanged(t){const e=this.hass.states[this._config.entity],i=t.target,s=i.value??"";!s||s!==o.Hh&&s!==o.HV?(s!==e.state&&(0,c.K)(this.hass,e.entity_id,s),i.blur()):i.value=e.state}}d.styles=n.AH`hui-generic-entity-row{align-items:center;display:flex}ha-input{width:100%}`,(0,a.Cg)([(0,h.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,a.Cg)([(0,h.wk)()],d.prototype,"_config",void 0),d=(0,a.Cg)([(0,h.EM)("hui-text-entity-row")],d),s()}catch(t){s(t)}})}};
//# sourceMappingURL=28928.108a167e18a4aba5.js.map