export const __rspack_esm_id="84175";export const __rspack_esm_ids=["84175"];export const __webpack_modules__={45100(o,t,a){a.a(o,async function(o,i){try{a.r(t),a.d(t,{HaIconButtonPrev:()=>d});var e=a(62826),s=a(96196),n=a(97735),r=a(63091),c=a(26300),l=o([c]);c=(l.then?(await l)():l)[0];const h="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",p="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";class d extends s.WF{render(){return s.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...o){super(...o),this.disabled=!1,this._icon="rtl"===r.G.document.dir?p:h}}(0,e.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,e.Cg)([(0,n.MZ)({type:Boolean})],d.prototype,"disabled",void 0),(0,e.Cg)([(0,n.MZ)()],d.prototype,"label",void 0),(0,e.Cg)([(0,n.MZ)()],d.prototype,"href",void 0),(0,e.Cg)([(0,n.MZ)()],d.prototype,"target",void 0),(0,e.Cg)([(0,n.MZ)()],d.prototype,"rel",void 0),(0,e.Cg)([(0,n.MZ)()],d.prototype,"download",void 0),(0,e.Cg)([(0,n.wk)()],d.prototype,"_icon",void 0),d=(0,e.Cg)([(0,n.EM)("ha-icon-button-prev")],d),i()}catch(o){i(o)}})},55218(o,t,a){a.a(o,async function(o,i){try{a.r(t);var e=a(62826),s=a(96196),n=a(97735),r=a(1087),c=a(63130),l=a(18350),h=(a(93444),a(26300)),p=a(45100),d=a(72554),g=(a(17308),a(2846),a(71418)),y=a(31420),u=a(14503),_=a(81619),m=o([l,h,p,d,g,y]);[l,h,p,d,g,y]=m.then?(await m)():m;const b="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",v="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",k="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z";class f extends s.WF{showDialog(o){this._params=o,this._open=!0}closeDialog(){return this._open&&(0,r.r)(this,"dialog-closed",{dialog:this.localName}),this._open=!1,this._params=void 0,!0}render(){return this._params?s.qy` <ha-dialog .hass="${this.hass}" .open="${this._open}" header-title="${this.hass.localize("ui.panel.config.backup.dialogs.show_encryption_key.title")}" prevent-scrim-close @closed="${this.closeDialog}"> <ha-icon-button slot="headerNavigationIcon" data-dialog="close" .label="${this.hass.localize("ui.common.close")}" .path="${b}"></ha-icon-button> <p> ${this.hass.localize("ui.panel.config.backup.dialogs.show_encryption_key.description")} </p> <div class="encryption-key"> <p>${this._params?.currentKey}</p> <ha-icon-button .path="${v}" @click="${this._copyKeyToClipboard}"></ha-icon-button> </div> <ha-md-list> <ha-md-list-item> <span slot="headline"> ${this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit")} </span> <span slot="supporting-text"> ${this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit_description")} </span> <ha-button slot="end" @click="${this._download}"> <ha-svg-icon .path="${k}" slot="start"></ha-svg-icon> ${this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit_action")} </ha-button> </ha-md-list-item> </ha-md-list> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" @click="${this.closeDialog}"> ${this.hass.localize("ui.common.close")} </ha-button> </ha-dialog-footer> </ha-dialog> `:s.s6}async _copyKeyToClipboard(){this._params?.currentKey&&(await(0,c.l)(this._params?.currentKey,this.renderRoot.querySelector("div")),(0,_.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")}))}_download(){this._params?.currentKey&&(0,y.Sx)(this.hass,this._params.currentKey,"old")}static get styles(){return[u.RF,u.nA,s.AH`ha-dialog{--dialog-content-padding:var(--ha-space-2) var(--ha-space-6)}ha-md-list{background:0 0;--md-list-item-leading-space:0;--md-list-item-trailing-space:0}.encryption-key{border:1px solid var(--divider-color);background-color:var(--primary-background-color);border-radius:var(--ha-border-radius-md);padding:16px;display:flex;flex-direction:row;align-items:center;gap:var(--ha-space-6)}.encryption-key p{margin:0;flex:1;font-size:var(--ha-font-size-xl);font-family:var(--ha-font-family-code);font-style:normal;font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);text-align:center}.encryption-key ha-icon-button{flex:none;margin:-16px}p{margin-top:0}`]}constructor(...o){super(...o),this._open=!1}}(0,e.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,e.Cg)([(0,n.wk)()],f.prototype,"_open",void 0),(0,e.Cg)([(0,n.wk)()],f.prototype,"_params",void 0),f=(0,e.Cg)([(0,n.EM)("ha-dialog-show-backup-encryption-key")],f),i()}catch(o){i(o)}})}};
//# sourceMappingURL=84175.3560110f9eaed9ef.js.map