export const __rspack_esm_id="67973";export const __rspack_esm_ids=["67973"];export const __webpack_modules__={85657(t,e,i){i.d(e,{K:()=>s});const s=(t,e,i)=>t.callService("text","set_value",{value:i},{entity_id:e})},58212(t,e,i){i.a(t,async function(t,s){try{i.r(e);var a=i(62826),n=i(96196),h=i(97735),r=(i(75709),i(22675)),o=i(85657),c=i(37642),l=i(784),u=i(79757),g=i(85979),d=t([u,g]);[u,g]=d.then?(await d)():d;class _ extends n.WF{setConfig(t){if(!t)throw new Error("Invalid configuration");this._config=t}shouldUpdate(t){return(0,l.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,g.j)(this.hass,this._config.entity)} </hui-warning> `;const e=(0,c.v)(this.hass,t,this._config.name);return n.qy` <hui-generic-entity-row .hass="${this.hass}" .config="${this._config}" hide-name> <ha-textfield .label="${e}" .disabled="${t.state===r.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.emtpy_value")}"></ha-textfield> </hui-generic-entity-row> `}_valueChanged(t){const e=this.hass.states[this._config.entity],i=t.target.value;i&&(0,r.g0)(i)?t.target.value=e.state:(i!==e.state&&(0,o.K)(this.hass,e.entity_id,i),t.target.blur())}}_.styles=n.AH`hui-generic-entity-row{display:flex;align-items:center}ha-textfield{width:100%}`,(0,a.Cg)([(0,h.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,a.Cg)([(0,h.wk)()],_.prototype,"_config",void 0),_=(0,a.Cg)([(0,h.EM)("hui-text-entity-row")],_),s()}catch(t){s(t)}})}};
//# sourceMappingURL=67973.d97a5247037f0ce3.js.map