export const __rspack_esm_id="45555";export const __rspack_esm_ids=["45555"];export const __webpack_modules__={21630(t,e,s){s.r(e),s.d(e,{HuiSelectOptionsCardFeatureEditor:()=>r});s(18111),s(61701);var o=s(62826),i=s(96196),a=s(44457),n=s(22786),c=s(1087);s(52763);class r extends i.WF{setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return i.s6;const t=this.context?.entity_id?this.hass.states[this.context?.entity_id]:void 0,e={...this._config,customize_options:void 0!==this._config.options},s=this._schema(this.hass.formatEntityState,t,e.customize_options);return i.qy` <ha-form .hass="${this.hass}" .data="${e}" .schema="${s}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> `}_valueChanged(t){const{customize_options:e,...s}=t.detail.value,o=this.context?.entity_id?this.hass.states[this.context?.entity_id]:void 0;e&&!s.options&&(s.options=o?.attributes.options||[]),!e&&s.options&&delete s.options,(0,c.r)(this,"config-changed",{config:s})}constructor(...t){super(...t),this._schema=(0,n.A)((t,e,s)=>[{name:"customize_options",selector:{boolean:{}}},...s?[{name:"options",selector:{select:{multiple:!0,reorder:!0,options:e?.attributes.options?.map(s=>({value:s,label:t(e,s)}))||[]}}}]:[]]),this._computeLabelCallback=t=>{switch(t.name){case"options":case"customize_options":return this.hass.localize(`ui.panel.lovelace.editor.features.types.select-options.${t.name}`);default:return""}}}}(0,o.Cg)([(0,a.MZ)({attribute:!1})],r.prototype,"hass",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],r.prototype,"context",void 0),(0,o.Cg)([(0,a.wk)()],r.prototype,"_config",void 0),r=(0,o.Cg)([(0,a.EM)("hui-select-options-card-feature-editor")],r)}};
//# sourceMappingURL=45555.bc9b50012fb21974.js.map