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