"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["16268"],{59079:function(i,t,e){e.a(i,async function(i,s){try{e.r(t);e(3362),e(62953);var a=e(40445),o=e(96196),n=e(77845),r=e(1087),c=e(18350),h=e(65829),l=(e(93444),e(72554)),d=e(20559),p=e(14503),v=i([c,h,l]);[c,h,l]=v.then?(await v)():v;let g,_,u,f,w,m,y,L,$=i=>i;const x="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",C="M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z";class b extends o.WF{async showDialog(i){this.device_id=i.device_id,this._open=!0}render(){return this.device_id?(0,o.qy)(g||(g=$` <ha-dialog .hass="${0}" .open="${0}" header-title="${0}" @closed="${0}"> ${0} <ha-dialog-footer slot="footer"> ${0} </ha-dialog-footer> </ha-dialog> `),this.hass,this._open,this.hass.localize("ui.panel.config.matter.reinterview_node.title"),this._dialogClosed,this._status?"started"===this._status?(0,o.qy)(u||(u=$` <div class="flex-container"> <ha-spinner></ha-spinner> <div class="status"> <p> <b> ${0} </b> </p> <p> ${0} </p> </div> </div> `),this.hass.localize("ui.panel.config.matter.reinterview_node.in_progress"),this.hass.localize("ui.panel.config.matter.reinterview_node.run_in_background")):"failed"===this._status?(0,o.qy)(f||(f=$` <div class="flex-container"> <ha-svg-icon .path="${0}" class="failed"></ha-svg-icon> <div class="status"> <p> ${0} </p> </div> </div> `),C,this.hass.localize("ui.panel.config.matter.reinterview_node.interview_failed")):"finished"===this._status?(0,o.qy)(w||(w=$` <div class="flex-container"> <ha-svg-icon .path="${0}" class="success"></ha-svg-icon> <div class="status"> <p> ${0} </p> </div> </div> `),x,this.hass.localize("ui.panel.config.matter.reinterview_node.interview_complete")):o.s6:(0,o.qy)(_||(_=$` <p> ${0} </p> <p> <em> ${0} </em> </p> `),this.hass.localize("ui.panel.config.matter.reinterview_node.introduction"),this.hass.localize("ui.panel.config.matter.reinterview_node.battery_device_warning")),this._status?(0,o.qy)(y||(y=$` <ha-button slot="primaryAction" @click="${0}"> ${0} </ha-button> `),this.closeDialog,this.hass.localize("ui.common.close")):(0,o.qy)(m||(m=$` <ha-button slot="primaryAction" @click="${0}"> ${0} </ha-button> `),this._startReinterview,this.hass.localize("ui.panel.config.matter.reinterview_node.start_reinterview"))):o.s6}async _startReinterview(){if(this.hass){this._status="started";try{await(0,d.JW)(this.hass,this.device_id),this._status="finished"}catch(i){this._status="failed"}}}closeDialog(){this._open=!1}_dialogClosed(){this.device_id=void 0,this._status=void 0,(0,r.r)(this,"dialog-closed",{dialog:this.localName})}static get styles(){return[p.nA,(0,o.AH)(L||(L=$`.success{color:var(--success-color)}.failed{color:var(--error-color)}.flex-container{display:flex;align-items:center}.stages{margin-top:16px}.stage ha-svg-icon{width:16px;height:16px}.stage{padding:8px}ha-svg-icon{width:68px;height:48px}.flex-container ha-spinner,.flex-container ha-svg-icon{margin-right:20px}`))]}constructor(...i){super(...i),this._open=!1}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,a.Cg)([(0,n.wk)()],b.prototype,"device_id",void 0),(0,a.Cg)([(0,n.wk)()],b.prototype,"_status",void 0),(0,a.Cg)([(0,n.wk)()],b.prototype,"_open",void 0),b=(0,a.Cg)([(0,n.EM)("dialog-matter-reinterview-node")],b),s()}catch(g){s(g)}})}}]);
//# sourceMappingURL=16268.090db6395b4a8180.js.map