"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["68827"],{53110:function(t,i,n){n.a(t,async function(t,s){try{n.r(i);var e,a,o,h,r=n(72153),u=n(44734),c=n(43080),g=n(69683),f=n(6454),y=(n(16280),n(18111),n(13579),n(26099),n(40445)),l=n(96196),v=n(77845),_=n(46190),d=n(71727),p=(n(25240),n(784)),w=n(79757),k=n(85979),C=t([w]);w=(C.then?(await C)():C)[0];var m=function(t){function i(){return(0,u.A)(this,i),(0,g.A)(this,i,arguments)}return(0,f.A)(i,t),(0,c.A)(i,[{key:"_computeCanToggle",value:function(t,i){var n=this;return i.some(function(i){var s,e=(0,d.m)(i);return"group"===e?n._computeCanToggle(t,null===(s=n.hass)||void 0===s?void 0:s.states[i].attributes.entity_id):_.FD.has(e)})}},{key:"setConfig",value:function(t){if(!t)throw new Error("Invalid configuration");this._config=t}},{key:"shouldUpdate",value:function(t){return(0,p.LX)(this,t)}},{key:"render",value:function(){if(!this._config||!this.hass)return l.s6;var t=this.hass.states[this._config.entity];return t?(0,l.qy)(a||(a=(0,r.A)([' <hui-generic-entity-row .hass="','" .config="','"> '," </hui-generic-entity-row> "])),this.hass,this._config,this._computeCanToggle(this.hass,t.attributes.entity_id)?(0,l.qy)(o||(o=(0,r.A)([' <ha-entity-toggle .hass="','" .stateObj="','"></ha-entity-toggle> '])),this.hass,t):(0,l.qy)(h||(h=(0,r.A)([' <div class="text-content"> '," </div> "])),this.hass.formatEntityState(t))):(0,l.qy)(e||(e=(0,r.A)([' <hui-warning .hass="','"> '," </hui-warning> "])),this.hass,(0,k.j)(this.hass,this._config.entity))}}])}(l.WF);(0,y.Cg)([(0,v.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,y.Cg)([(0,v.wk)()],m.prototype,"_config",void 0),m=(0,y.Cg)([(0,v.EM)("hui-group-entity-row")],m),s()}catch(A){s(A)}})}}]);
//# sourceMappingURL=68827.4834e1648b7d1432.js.map