export const __rspack_esm_id=8511;export const __rspack_esm_ids=[8511];export const __webpack_modules__={28383(t,e,i){i.d(e,{},{BJ:(t,e,i)=>t.callWS({type:"input_text/update",input_text_id:e,...i}),KY:(t,e,i)=>t.callService(e.split(".",1)[0],"set_value",{value:i,entity_id:e}),MG:t=>t.callWS({type:"input_text/list"}),d_:(t,e)=>t.callWS({type:"input_text/delete",input_text_id:e}),m4:(t,e)=>t.callWS({type:"input_text/create",...e})})},62562(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),l=i(96682),u=i(28383),c=i(72441),o=i(59366),_=i(58178),p=t([r,o,_]);[r,o,_]=p.then?(await p)():p;class d extends n.WF{setConfig(t){if(!t)throw new Error("Invalid configuration");this._config=t}shouldUpdate(t){return(0,c.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===l.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._selectedValueChanged} .placeholder=${this.hass.localize("ui.card.text.empty_value")}></ha-input> </hui-generic-entity-row> `}_selectedValueChanged(t){const e=this.hass.states[this._config.entity],i=t.target,s=i.value??"";!s||s!==l.Hh&&s!==l.HV?(s!==e.state&&(0,u.KY)(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-input-text-entity-row")],d),s()}catch(t){s(t)}})}};
//# sourceMappingURL=8511.44e8de739a740324.js.map