export const __rspack_esm_id="88028";export const __rspack_esm_ids=["88028"];export const __webpack_modules__={93444(a,e,s){var i=s(62826),t=s(96196),o=s(97735);class n extends t.WF{render(){return t.qy` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `}static get styles(){return[t.AH`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`]}}n=(0,i.Cg)([(0,o.EM)("ha-dialog-footer")],n)},59959(a,e,s){s.a(a,async function(a,i){try{s.r(e);var t=s(62826),o=s(96196),n=s(97735),l=s(95747),c=s(1087),d=s(38962),r=s(18350),p=(s(93444),s(26300)),h=s(72554),_=s(14503),u=s(31381),g=a([d,r,p,h,l]);[d,r,p,h,l]=g.then?(await g)():g;const f="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",y="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";class b extends o.WF{showDialog(a){this._params=a,this._open=!0}closeDialog(){this._open=!1}_dialogClosed(){this._open=!1,this._params?.closeDialog?.(),this._params=void 0,this._obfuscateIp=!0,(0,c.r)(this,"dialog-closed",{dialog:this.localName})}render(){if(!this._params)return o.s6;const{details:a}=this._params;return o.qy` <ha-dialog .hass="${this.hass}" .open="${this._open}" header-title="${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.heading")}" @closed="${this._dialogClosed}"> <div class="intro"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.description")} </span> <b> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.other_home_assistant")} </b> </div> <div class="instance-details"> ${a.name?o.qy`<div class="instance-detail"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.instance_name")}: </span> <span>${a.name}</span> </div>`:o.s6} ${a.version?o.qy`<div class="instance-detail"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.instance_version")}: </span> <span>${a.version}</span> </div>`:o.s6} <div class="instance-detail"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.ip_address")}: </span> <div class="obfuscated"> <span> ${this._obfuscateIp?(0,u.w)(a.remote_ip_address):a.remote_ip_address} </span> <ha-icon-button class="toggle-unmasked-url" .label="${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.obfuscated_ip."+(this._obfuscateIp?"hide":"show"))}" @click="${this._toggleObfuscateIp}" .path="${this._obfuscateIp?f:y}"></ha-icon-button> </div> </div> <div class="instance-detail"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.connected_at")}: </span> <span> ${(0,l.r6)(new Date(a.connected_at),this.hass.locale,this.hass.config)} </span> </div> </div> <ha-alert alert-type="info" .title="${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.info_backups.title")}"> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.info_backups.description")} </ha-alert> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${this.closeDialog}"> ${this.hass.localize("ui.common.cancel")} </ha-button> <ha-button slot="primaryAction" @click="${this._logInHere}"> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.login_here")} </ha-button> </ha-dialog-footer> </ha-dialog> `}_toggleObfuscateIp(){this._obfuscateIp=!this._obfuscateIp}_logInHere(){this._params?.logInHereAction?.(),this.closeDialog()}static get styles(){return[_.nA,o.AH`.intro b{display:block;margin-top:16px}.instance-details{display:flex;flex-direction:column;margin-bottom:16px}.instance-detail{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.obfuscated{align-items:center;display:flex;flex-direction:row}`]}constructor(...a){super(...a),this._open=!1,this._obfuscateIp=!0}}(0,t.Cg)([(0,n.wk)()],b.prototype,"_params",void 0),(0,t.Cg)([(0,n.wk)()],b.prototype,"_open",void 0),(0,t.Cg)([(0,n.wk)()],b.prototype,"_obfuscateIp",void 0),b=(0,t.Cg)([(0,n.EM)("dialog-cloud-already-connected")],b),i()}catch(a){i(a)}})},31381(a,e,s){function i(a){return a.endsWith(".ui.nabu.casa")?"https://•••••••••••••••••.ui.nabu.casa":a.replace(/(?<=:\/\/)[\w-]+|(?<=\.)[\w-]+/g,a=>"•".repeat(a.length))}s.d(e,{w:()=>i})}};
//# sourceMappingURL=88028.f1c4066f598d0887.js.map