"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[64609],{32251:function(t,e,n){var o=n(43939),i=n(97058),a=n(74512),s=(n(28706),["customize"]),u=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}}}]:[]))},r=function(t,e){return(0,i.A)((0,i.A)({},t),{},{customize:void 0!==t[e]})},c=function(t,e,n){var i=t.customize,u=(0,o.A)(t,s);return i&&!u[e]?u[e]=(0,a.A)(n):i||delete u[e],u};n.d(e,{B4:function(){return r},KF:function(){return u},fi:function(){return c}})},84888:function(t,e,n){n.a(t,async function(t,o){try{n.r(e);var i,a=n(28430),s=n(57567),u=n(25979),r=n(12463),c=n(16472),d=(n(28706),n(62062),n(18111),n(61701),n(26099),n(15697)),l=n(57527),h=n(51209),f=n(90789),m=n(148),v=n(55682),_=n(32251),p=t([v]);v=(p.then?(await p)():p)[0];var y=function(t){function e(){var t;(0,s.A)(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(t=(0,c.A)(this,e,[].concat(o)))._schema=(0,f.A)(function(e,n){var o,i;return(0,_.KF)({field:"sound_modes",customize:n,options:null!==(o=null==e||null===(i=e.attributes.sound_mode_list)||void 0===i?void 0:i.map(function(n){return{value:n,label:t.hass.formatEntityAttributeValue(e,"sound_mode",n)}}))&&void 0!==o?o:[]})}),t._computeLabelCallback=function(e){return t.hass.localize("ui.panel.lovelace.editor.features.types.media-player-sound-mode.".concat(e.name))},t}return(0,r.A)(e,t),(0,u.A)(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"render",value:function(){var t;if(!this.hass||!this._config)return l.s6;var e=null!==(t=this.context)&&void 0!==t&&t.entity_id?this.hass.states[this.context.entity_id]:void 0,n=(0,_.B4)(this._config,"sound_modes"),o=this._schema(e,n.customize);return(0,l.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,o=null!==(e=this.context)&&void 0!==e&&e.entity_id?this.hass.states[this.context.entity_id]:void 0,i=null!==(n=null==o?void 0:o.attributes.sound_mode_list)&&void 0!==n?n:[],a=(0,_.fi)(t.detail.value,"sound_modes",i);(0,m.r)(this,"config-changed",{config:a})}}])}(l.WF);(0,d.Cg)([(0,h.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,d.Cg)([(0,h.MZ)({attribute:!1})],y.prototype,"context",void 0),(0,d.Cg)([(0,h.wk)()],y.prototype,"_config",void 0),y=(0,d.Cg)([(0,h.EM)("hui-media-player-sound-mode-card-feature-editor")],y),n.d(e,{HuiMediaPlayerSoundModeCardFeatureEditor:function(){return y}}),o()}catch(g){o(g)}})}}]);
//# sourceMappingURL=64609.c005ea92c1f5b457.js.map