"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[72393],{32251:function(t,e,n){var i=n(43939),a=n(97058),o=n(74512),s=(n(28706),["customize"]),c=function(t){var e=t.field,n=t.customize,i=t.options;return[{name:"customize",selector:{boolean:{}}}].concat((0,o.A)(n?[{name:e,selector:{select:{mode:"list",reorder:!0,multiple:!0,options:i}}}]:[]))},r=function(t,e){return(0,a.A)((0,a.A)({},t),{},{customize:void 0!==t[e]})},u=function(t,e,n){var a=t.customize,c=(0,i.A)(t,s);return a&&!c[e]?c[e]=(0,o.A)(n):a||delete c[e],c};n.d(e,{B4:function(){return r},KF:function(){return c},fi:function(){return u}})},64208:function(t,e,n){n.a(t,async function(t,i){try{n.r(e);var a,o=n(28430),s=n(57567),c=n(25979),r=n(12463),u=n(16472),l=(n(28706),n(2008),n(62062),n(18111),n(22489),n(61701),n(26099),n(15697)),f=n(57527),h=n(51209),m=n(90789),d=n(148),v=n(55682),p=n(18654),_=n(27556),g=n(32251),y=t([v]);v=(y.then?(await y)():y)[0];var A=function(t){function e(){var t;(0,s.A)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=(0,u.A)(this,e,[].concat(i)))._schema=(0,m.A)(function(e,n){return(0,g.KF)({field:"commands",customize:n,options:_.zz.filter(function(t){return e&&(0,p.Fv)(e,t)}).map(function(e){return{value:e,label:t.hass.localize("ui.panel.lovelace.editor.features.types.vacuum-commands.commands_list.".concat(e))}})})}),t._computeLabelCallback=function(e){return t.hass.localize("ui.panel.lovelace.editor.features.types.vacuum-commands.".concat(e.name))},t}return(0,r.A)(e,t),(0,c.A)(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"render",value:function(){var t;if(!this.hass||!this._config)return f.s6;var e=null!==(t=this.context)&&void 0!==t&&t.entity_id?this.hass.states[this.context.entity_id]:void 0,n=(0,g.B4)(this._config,"commands"),i=this._schema(e,n.customize);return(0,f.qy)(a||(a=(0,o.A)([" <ha-form .hass="," .data="," .schema="," .computeLabel="," @value-changed=","></ha-form> "])),this.hass,n,i,this._computeLabelCallback,this._valueChanged)}},{key:"_valueChanged",value:function(t){var e,n=null!==(e=this.context)&&void 0!==e&&e.entity_id?this.hass.states[this.context.entity_id]:void 0,i=p.vA.filter(function(t){return n&&(0,p.Fv)(n,t)}),a=(0,g.fi)(t.detail.value,"commands",i);(0,d.r)(this,"config-changed",{config:a})}}])}(f.WF);(0,l.Cg)([(0,h.MZ)({attribute:!1})],A.prototype,"hass",void 0),(0,l.Cg)([(0,h.MZ)({attribute:!1})],A.prototype,"context",void 0),(0,l.Cg)([(0,h.wk)()],A.prototype,"_config",void 0),A=(0,l.Cg)([(0,h.EM)("hui-vacuum-commands-card-feature-editor")],A),n.d(e,{HuiVacuumCommandsCardFeatureEditor:function(){return A}}),i()}catch(C){i(C)}})}}]);
//# sourceMappingURL=72393.ee3f2f0d582ff878.js.map