"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["86310"],{63130:function(o,e,a){a.d(e,{l:function(){return i}});a(3362);var t=a(50248);const i=async(o,e)=>{var a;if(navigator.clipboard)try{return void(await navigator.clipboard.writeText(o))}catch(c){}const i=e||(null===(a=(0,t.n)())||void 0===a?void 0:a.getRootNode())||document.body,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)}},82277:function(o,e,a){a.a(o,async function(o,t){try{a.r(e);a(3362);var i=a(40445),s=a(96196),c=a(77845),n=a(1087),r=a(63130),l=a(18350),d=(a(93444),a(26300)),p=a(72554),h=a(14503),y=a(81619),u=o([l,d,p]);[l,d,p]=u.then?(await u)():u;let v,g,m=o=>o;const f="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,n.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._params?(0,s.qy)(v||(v=m` <ha-dialog open @closed="${0}" header-title="${0}"> <div class="content"> <p> ${0} </p> <div class="key-row"> <div class="key-container"> <code>${0}</code> </div> <ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button> </div> </div> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" data-dialog="close"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this.closeDialog,this.hass.localize("ui.panel.config.devices.esphome.encryption_key_title"),this.hass.localize("ui.panel.config.devices.esphome.encryption_key_description"),this._params.encryption_key,this._copyToClipboard,this.hass.localize("ui.common.copy"),f,this.hass.localize("ui.common.close")):s.s6}async _copyToClipboard(){var o;null!==(o=this._params)&&void 0!==o&&o.encryption_key&&(await(0,r.l)(this._params.encryption_key),(0,y.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")}))}static get styles(){return[h.nA,(0,s.AH)(g||(g=m`.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(v){t(v)}})}}]);
//# sourceMappingURL=86310.fbcaca4bd301e8a2.js.map