"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[76373],{1268:function(t,i,n){n.a(t,async function(t,s){try{n.r(i);var e,a,r,h,o=n(28430),c=n(57567),u=n(25979),f=n(12463),g=n(16472),y=(n(16280),n(15697)),v=n(57527),l=n(51209),d=n(88293),_=n(96682),p=n(72441),w=n(59366),k=n(58178),A=t([d,w,k]);[d,w,k]=A.then?(await A)():A;var C=function(t){function i(){return(0,c.A)(this,i),(0,g.A)(this,i,arguments)}return(0,f.A)(i,t),(0,u.A)(i,[{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 v.s6;var t=this.hass.states[this._config.entity];if(!t)return(0,v.qy)(e||(e=(0,o.A)([" <hui-warning .hass=","> "," </hui-warning> "])),this.hass,(0,k.j)(this.hass,this._config.entity));var i="open"===t.state||"closed"===t.state||t.state===_.Hh||t.state===_.HV;return(0,v.qy)(a||(a=(0,o.A)([" <hui-generic-entity-row .hass="," .config="," .catchInteraction=","> "," </hui-generic-entity-row> "])),this.hass,this._config,!i,i?(0,v.qy)(r||(r=(0,o.A)([" <ha-entity-toggle .stateObj=","></ha-entity-toggle> "])),t):(0,v.qy)(h||(h=(0,o.A)([' <div class="text-content"> '," </div> "])),this.hass.formatEntityState(t)))}}])}(v.WF);(0,y.Cg)([(0,l.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,y.Cg)([(0,l.wk)()],C.prototype,"_config",void 0),C=(0,y.Cg)([(0,l.EM)("hui-valve-entity-row")],C),s()}catch(q){s(q)}})}}]);
//# sourceMappingURL=76373.e02532946de3f7dc.js.map