export const __rspack_esm_id="8550";export const __rspack_esm_ids=["8550"];export const __webpack_modules__={71154(t,i,s){s.a(t,async function(t,a){try{s.r(i),s.d(i,{HuiUpdatesCard:()=>g});s(18111),s(22489);var e=s(62826),n=s(96196),o=s(97735),c=s(1087),h=s(91926),r=(s(76776),s(22573),s(80933),s(32248),s(24247)),l=s(37544),d=s(97176),_=s(51989),p=t([r]);r=(p.then?(await p)():p)[0];const u="M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M5.12,5H18.87L17.93,4H5.93L5.12,5M12,9.5L6.5,15H10V17H14V15H17.5L12,9.5Z";class g extends n.WF{setConfig(t){this._config=t}getCardSize(){return this._config?.vertical?2:1}getGridOptions(){let t=6,i=1;return this._config?.vertical&&(i++,t=3),{columns:6,rows:i,min_columns:t,min_rows:i}}_getUpdateEntities(){return this.hass?(0,r.ZS)(this.hass.states,this.hass.locale.language).filter(t=>(0,r.VK)(t,!1)):[]}async _handleAction(t){"tap"!==t.detail.action||(0,d.h)(this._config?.tap_action)?(0,l.$)(this,this.hass,this._config,t.detail.action):(0,h.o)("/config/updates")}get _hasCardAction(){return!this._config?.tap_action||(0,d.h)(this._config?.tap_action)||(0,d.h)(this._config?.hold_action)||(0,d.h)(this._config?.double_tap_action)}willUpdate(t){if(super.willUpdate(t),!this._config||!this.hass)return;const i=this._getUpdateEntities(),s=Boolean(!this.hass.user?.is_admin||this._config.hide_empty&&0===i.length);s!==this.hidden&&(this.style.display=s?"none":"",this.toggleAttribute("hidden",s),(0,c.r)(this,"card-visibility-changed",{value:!s}))}render(){if(!this._config||!this.hass)return n.s6;const t=this._getUpdateEntities().length,i=this.hass.localize("ui.card.updates.title"),s=t>0?this.hass.localize("ui.card.updates.count_updates",{count:t}):this.hass.localize("ui.card.updates.no_updates");return n.qy` <ha-card> <ha-tile-container .vertical="${Boolean(this._config.vertical)}" .interactive="${this._hasCardAction}" .actionHandlerOptions="${{hasHold:(0,d.h)(this._config.hold_action),hasDoubleClick:(0,d.h)(this._config.double_tap_action)}}" @action="${this._handleAction}"> <ha-tile-icon slot="icon" .iconPath="${u}"></ha-tile-icon> <ha-tile-info slot="info" .primary="${i}" .secondary="${s}"></ha-tile-info> </ha-tile-container> </ha-card> `}constructor(...t){super(...t),this.connectedWhileHidden=!0}}g.styles=[_.c,n.AH`:host{--tile-color:var(--info-color)}`],(0,e.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,e.Cg)([(0,o.wk)()],g.prototype,"_config",void 0),g=(0,e.Cg)([(0,o.EM)("hui-updates-card")],g),a()}catch(t){a(t)}})}};
//# sourceMappingURL=8550.ca01c0a1b3b01095.js.map