export const __rspack_esm_id=45201;export const __rspack_esm_ids=[45201];export const __webpack_modules__={42023(s,i,e){var t=e(34883),r=e(57230);const a=66649!=e.j?{critical:1,error:2,warning:3}:null,o=s=>s.sendMessagePromise({type:"repairs/list_issues"}),n=(s,i)=>s.subscribeEvents((0,r.s)(()=>o(s).then(s=>i.setState(s,!0)),500,!0),"repairs_issue_registry_updated");e.d(i,{},{AU:(s,i,e)=>s.sendMessagePromise({type:"repairs/get_issue_data",domain:i,issue_id:e}),Ik:async(s,i,e)=>s.callWS({type:"repairs/ignore_issue",issue_id:i.issue_id,domain:i.domain,ignore:e}),Qk:a,TP:(s,i)=>(0,t.N)("_repairsIssueRegistry",o,n,s,i),UL:(s,i)=>s.callApi("DELETE",`repairs/issues/fix/${i}`),ZF:(s,i)=>s.callApi("GET",`repairs/issues/fix/${i}`),do:(s,i,e)=>s.callApi("POST",`repairs/issues/fix/${i}`,e),vR:(s,i,e)=>s.callApi("POST","repairs/issues/fix",{handler:i,issue_id:e})})},39559(s,i,e){e(74423),e(18111),e(13579);var t=e(15697),r=e(79224);e.d(i,{},{E:s=>{class i extends s{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const s=this.__unsubs.pop();s instanceof Promise?s.then(s=>s()):s()}this.__unsubs=void 0}}updated(s){if(super.updated(s),s.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const i of s.keys())if(this.hassSubscribeRequiredHostProps.includes(i))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){void 0===this.__unsubs&&this.isConnected&&void 0!==this.hass&&!this.hassSubscribeRequiredHostProps?.some(s=>void 0===this[s])&&(this.__unsubs=this.hassSubscribe())}}return(0,t.Cg)([(0,r.MZ)({attribute:!1})],i.prototype,"hass",void 0),i}})},64584(s,i,e){e.r(i);e(18111),e(22489);var t=e(15697),r=e(57527),a=e(79224),o=e(148),n=e(56245),c=(e(75041),e(32878),e(88472),e(51517),e(42023)),h=e(39559),d=e(42239),u=e(49511),_=e(78316);class l extends((0,h.E)(r.WF)){hassSubscribe(){return[(0,c.TP)(this.hass.connection,s=>{this._repairsIssues=s.issues.filter(s=>!1!==s.active&&!s.ignored)})]}setConfig(s){this._config=s}getCardSize(){return this._config?.vertical?2:1}getGridOptions(){let s=6,i=1;return this._config?.vertical&&(i++,s=3),{columns:6,rows:i,min_columns:s,min_rows:i}}async _handleAction(s){"tap"!==s.detail.action||(0,u.h)(this._config?.tap_action)?(0,d.$)(this,this.hass,this._config,s.detail.action):(0,n.oo)("/config/repairs")}get _hasCardAction(){return!this._config?.tap_action||(0,u.h)(this._config?.tap_action)||(0,u.h)(this._config?.hold_action)||(0,u.h)(this._config?.double_tap_action)}willUpdate(s){if(super.willUpdate(s),!this._config||!this.hass)return;const i=Boolean(!this.hass.user?.is_admin||this._config.hide_empty&&this._repairsIssues&&0===this._repairsIssues.length);i!==this.hidden&&(this.style.display=i?"none":"",this.toggleAttribute("hidden",i),(0,o.r)(this,"card-visibility-changed",{value:!i}))}render(){if(!this._config||!this.hass||this.hidden)return r.s6;const s=Array.isArray(this._repairsIssues)?this._repairsIssues.length:0,i=this.hass.localize("ui.card.repairs.title"),e=s>0?this.hass.localize("ui.card.repairs.count_issues",{count:s}):this.hass.localize("ui.card.repairs.no_issues"),t=!this._repairsIssues;return r.qy` <ha-card> <ha-tile-container .vertical=${Boolean(this._config.vertical)} .interactive=${this._hasCardAction} .actionHandlerOptions=${{hasHold:(0,u.h)(this._config.hold_action),hasDoubleClick:(0,u.h)(this._config.double_tap_action)}} @action=${this._handleAction}> <ha-tile-icon slot="icon" .iconPath=${"M22.7,19L13.6,9.9C14.5,7.6 14,4.9 12.1,3C10.1,1 7.1,0.6 4.7,1.7L9,6L6,9L1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1C4.8,14 7.5,14.5 9.8,13.6L18.9,22.7C19.3,23.1 19.9,23.1 20.3,22.7L22.6,20.4C23.1,20 23.1,19.3 22.7,19Z"}></ha-tile-icon> <ha-tile-info slot="info" .primary=${i} .secondary=${e} .secondaryLoading=${t}></ha-tile-info> </ha-tile-container> </ha-card> `}constructor(...s){super(...s),this.connectedWhileHidden=!0}}l.styles=[_.c,r.AH`:host{--tile-color:var(--warning-color)}`],(0,t.Cg)([(0,a.MZ)({attribute:!1})],l.prototype,"hass",void 0),(0,t.Cg)([(0,a.wk)()],l.prototype,"_config",void 0),(0,t.Cg)([(0,a.wk)()],l.prototype,"_repairsIssues",void 0),l=(0,t.Cg)([(0,a.EM)("hui-repairs-card")],l),e.d(i,{HuiRepairsCard:()=>l})}};
//# sourceMappingURL=45201.f738105d40498584.js.map