export const __rspack_esm_id="86310";export const __rspack_esm_ids=["86310"];export const __webpack_modules__={63130(o,e,a){a.d(e,{l:()=>i});var t=a(50248);const i=async(o,e)=>{if(navigator.clipboard)try{return void await navigator.clipboard.writeText(o)}catch{}const a=e||(()=>{const o=(0,t.n)();if(o instanceof HTMLElement){let e=o.getRootNode(),a=null;for(;e instanceof ShadowRoot&&e.host instanceof HTMLElement;)a=e.host,e=e.host.getRootNode();if(a)return a}return document.body})(),i=document.createElement("textarea");i.value=o,i.setAttribute("readonly",""),i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.opacity="0",a.appendChild(i),i.select(),document.execCommand("copy"),a.removeChild(i)}},82277(o,e,a){a.a(o,async function(o,t){try{a.r(e);var i=a(62826),s=a(96196),c=a(97735),r=a(1087),n=a(63130),l=a(18350),d=(a(93444),a(26300)),p=a(72554),h=a(14503),y=a(81619),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{display:flex;flex-direction:column;gap:var(--ha-space-6)}.key-row{display:flex;gap:var(--ha-space-2);align-items:center}.key-container{flex:1;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);overflow:auto}p{margin:0;color:var(--secondary-text-color);line-height:var(--ha-line-height-condensed)}`]}}(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=86310.9b332e1517d5707f.js.map