"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[57540],{21971:function(t,e,i){var a=function(t){return t[t.LEARN_COMMAND=1]="LEARN_COMMAND",t[t.DELETE_COMMAND=2]="DELETE_COMMAND",t[t.ACTIVITY=4]="ACTIVITY",t}({});i.d(e,{C:function(){return a}})},81871:function(t,e,i){i.a(t,async function(t,a){try{i.r(e);var r,n,s,o=i(28430),c=i(57567),u=i(25979),l=i(12463),h=i(16472),v=(i(62062),i(18111),i(61701),i(26099),i(15697)),_=i(358),y=i(57527),f=i(51209),d=i(49938),A=i(41107),C=i(54939),b=i(80189),p=i(21971),m=t([C]);C=(m.then?(await m)():m)[0];var g=function(t){function e(){return(0,c.A)(this,e),(0,h.A)(this,e,arguments)}return(0,l.A)(e,t),(0,u.A)(e,[{key:"render",value:function(){var t,e=this;if(!this._localize||!this._formatters||!this.stateObj)return y.s6;var i=this.stateObj;return(0,y.qy)(r||(r=(0,o.A)([" "," "])),(0,A.$)(i,p.C.ACTIVITY)?(0,y.qy)(n||(n=(0,o.A)([" <ha-select .label="," .value="," @selected="," .options=","> </ha-select> "])),this._localize("ui.dialogs.more_info_control.remote.activity"),i.attributes.current_activity||"",this._handleActivityChanged,null===(t=i.attributes.activity_list)||void 0===t?void 0:t.map(function(t){return{value:t,label:e._formatters.formatEntityAttributeValue(i,"activity",t)}})):y.s6)}},{key:"_handleActivityChanged",value:function(t){var e=this.stateObj.attributes.current_activity,i=t.detail.value;i&&e!==i&&this._api.callService("remote","turn_on",{entity_id:this.stateObj.entity_id,activity:i})}}])}(y.WF);g.styles=(0,y.AH)(s||(s=(0,o.A)(["ha-select{width:100%}"]))),(0,v.Cg)([(0,f.MZ)({attribute:!1})],g.prototype,"stateObj",void 0),(0,v.Cg)([(0,f.wk)(),(0,d.IW)()],g.prototype,"_localize",void 0),(0,v.Cg)([(0,f.wk)(),(0,_.Fg)({context:b.p0,subscribe:!0})],g.prototype,"_formatters",void 0),(0,v.Cg)([(0,f.wk)(),(0,_.Fg)({context:b.Ie,subscribe:!0})],g.prototype,"_api",void 0),g=(0,v.Cg)([(0,f.EM)("more-info-remote")],g),a()}catch(E){a(E)}})}}]);
//# sourceMappingURL=57540.b020a3756d57e0f5.js.map