export const __rspack_esm_id=56139;export const __rspack_esm_ids=[56139];export const __webpack_modules__={16227(o,e,a){var t=a(50649);a.d(e,{},{l:async(o,e)=>{if(navigator.clipboard)try{return void await navigator.clipboard.writeText(o)}catch{}const a=e||(0,t.n)()?.getRootNode()||document.body,i=a.nodeType===Node.DOCUMENT_NODE?document.body:a,s=document.createElement("textarea");s.value=o,s.setAttribute("readonly",""),s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.opacity="0",i.appendChild(s),s.select(),document.execCommand("copy"),i.removeChild(s)}})},9350(o,e,a){a.a(o,async function(o,t){try{a.r(e);var i=a(15697),s=a(57527),c=a(79224),r=a(148),n=a(16227),l=a(98747),d=(a(90507),a(63047)),p=a(73651),h=a(76730),y=a(95678),m=o([l,d,p]);[l,d,p]=m.then?(await m)():m;const g="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";class _ extends s.WF{async showDialog(o){this._params=o}closeDialog(){this._params=void 0,(0,r.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._params?s.qy` <ha-dialog open @closed=${this.closeDialog} header-title=${this.hass.localize("ui.panel.config.devices.esphome.encryption_key_title")}> <div class="content"> <p> ${this.hass.localize("ui.panel.config.devices.esphome.encryption_key_description")} </p> <div class="key-row"> <div class="key-container"> <code>${this._params.encryption_key}</code> </div> <ha-icon-button @click=${this._copyToClipboard} .label=${this.hass.localize("ui.common.copy")} .path=${g}></ha-icon-button> </div> </div> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" data-dialog="close"> ${this.hass.localize("ui.common.close")} </ha-button> </ha-dialog-footer> </ha-dialog> `:s.s6}async _copyToClipboard(){this._params?.encryption_key&&(await(0,n.l)(this._params.encryption_key),(0,y.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")}))}static get styles(){return[h.nA,s.AH`.content{gap:var(--ha-space-6);flex-direction:column;display:flex}.key-row{gap:var(--ha-space-2);align-items:center;display:flex}.key-container{border-radius:var(--ha-space-2);border:1px solid var(--divider-color);background-color:var(--code-editor-background-color,var(--secondary-background-color));padding:var(--ha-space-3);flex:1;overflow:auto}p{color:var(--secondary-text-color);line-height:var(--ha-line-height-condensed);margin:0}`]}}(0,i.Cg)([(0,c.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,i.Cg)([(0,c.wk)()],_.prototype,"_params",void 0),_=(0,i.Cg)([(0,c.EM)("dialog-esphome-encryption-key")],_),t()}catch(o){t(o)}})}};
//# sourceMappingURL=56139.a356f85ad651cf56.js.map