"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[10519],{32251:function(t,e,n){var o=n(43939),i=n(97058),a=n(74512),r=(n(28706),["customize"]),s=function(t){var e=t.field,n=t.customize,o=t.options;return[{name:"customize",selector:{boolean:{}}}].concat((0,a.A)(n?[{name:e,selector:{select:{mode:"list",reorder:!0,multiple:!0,options:o}}}]:[]))},c=function(t,e){return(0,i.A)((0,i.A)({},t),{},{customize:void 0!==t[e]})},u=function(t,e,n){var i=t.customize,s=(0,o.A)(t,r);return i&&!s[e]?s[e]=(0,a.A)(n):i||delete s[e],s};n.d(e,{B4:function(){return c},KF:function(){return s},fi:function(){return u}})},47978:function(t,e,n){n.a(t,async function(t,o){try{n.r(e);var i,a=n(28430),r=n(57567),s=n(25979),c=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),d=n(90789),m=n(148),v=n(55682),p=n(64992),_=n(27556),y=n(32251),g=t([v]);v=(g.then?(await g)():g)[0];var w=function(t){function e(){var t;(0,r.A)(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(t=(0,u.A)(this,e,[].concat(o)))._schema=(0,d.A)(function(e,n){return(0,y.KF)({field:"commands",customize:n,options:_.Ry.filter(function(t){return e&&(0,p.Gw)(e,t)}).map(function(e){return{value:e,label:t.hass.localize("ui.panel.lovelace.editor.features.types.lawn-mower-commands.commands_list.".concat(e))}})})}),t._computeLabelCallback=function(e){return t.hass.localize("ui.panel.lovelace.editor.features.types.lawn-mower-commands.".concat(e.name))},t}return(0,c.A)(e,t),(0,s.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,y.B4)(this._config,"commands"),o=this._schema(e,n.customize);return(0,f.qy)(i||(i=(0,a.A)([" <ha-form .hass="," .data="," .schema="," .computeLabel="," @value-changed=","></ha-form> "])),this.hass,n,o,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,o=_.Ry.filter(function(t){return n&&(0,p.Gw)(n,t)}),i=(0,y.fi)(t.detail.value,"commands",o);(0,m.r)(this,"config-changed",{config:i})}}])}(f.WF);(0,l.Cg)([(0,h.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,l.Cg)([(0,h.MZ)({attribute:!1})],w.prototype,"context",void 0),(0,l.Cg)([(0,h.wk)()],w.prototype,"_config",void 0),w=(0,l.Cg)([(0,h.EM)("hui-lawn-mower-commands-card-feature-editor")],w),n.d(e,{HuiLawnMowerCommandsCardFeatureEditor:function(){return w}}),o()}catch(C){o(C)}})}}]);
//# sourceMappingURL=10519.f9a8cdc33f30fd3b.js.map