"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[56139],{16227:function(e,o,t){var a=t(36854),n=t(98117),i=(t(26099),t(3362),t(50649)),r=function(){var e=(0,n.A)((0,a.A)().m(function e(o,t){var n,r,c,s;return(0,a.A)().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!navigator.clipboard){e.n=4;break}return e.p=1,e.n=2,navigator.clipboard.writeText(o);case 2:return e.a(2);case 3:e.p=3,e.v;case 4:r=t||(null===(n=(0,i.n)())||void 0===n?void 0:n.getRootNode())||document.body,c=r.nodeType===Node.DOCUMENT_NODE?document.body:r,(s=document.createElement("textarea")).value=o,s.setAttribute("readonly",""),s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.opacity="0",c.appendChild(s),s.select(),document.execCommand("copy"),c.removeChild(s);case 5:return e.a(2)}},e,null,[[1,3]])}));return function(o,t){return e.apply(this,arguments)}}();t.d(o,{l:function(){return r}})},9350:function(e,o,t){t.a(e,async function(e,a){try{t.r(o);var n,i,r=t(28430),c=t(36854),s=t(98117),l=t(57567),d=t(25979),u=t(12463),p=t(16472),h=(t(26099),t(3362),t(15697)),y=t(57527),v=t(51209),f=t(148),m=t(16227),g=t(98747),k=(t(90507),t(63047)),A=t(73651),_=t(76730),b=t(95678),w=e([g,k,A]);[g,k,A]=w.then?(await w)():w;var C=function(e){function o(){return(0,l.A)(this,o),(0,p.A)(this,o,arguments)}return(0,u.A)(o,e),(0,d.A)(o,[{key:"showDialog",value:(a=(0,s.A)((0,c.A)().m(function e(o){return(0,c.A)().w(function(e){for(;;)switch(e.n){case 0:this._params=o;case 1:return e.a(2)}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"closeDialog",value:function(){this._params=void 0,(0,f.r)(this,"dialog-closed",{dialog:this.localName})}},{key:"render",value:function(){return this._params?(0,y.qy)(n||(n=(0,r.A)([" <ha-dialog open @closed="," header-title=",'> <div class="content"> <p> ',' </p> <div class="key-row"> <div class="key-container"> <code>',"</code> </div> <ha-icon-button @click="," .label="," .path=",'></ha-icon-button> </div> </div> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" data-dialog="close"> '," </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"),"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",this.hass.localize("ui.common.close")):y.s6}},{key:"_copyToClipboard",value:(t=(0,s.A)((0,c.A)().m(function e(){var o;return(0,c.A)().w(function(e){for(;;)switch(e.n){case 0:if(null!==(o=this._params)&&void 0!==o&&o.encryption_key){e.n=1;break}return e.a(2);case 1:return e.n=2,(0,m.l)(this._params.encryption_key);case 2:(0,b.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")});case 3:return e.a(2)}},e,this)})),function(){return t.apply(this,arguments)})}],[{key:"styles",get:function(){return[_.nA,(0,y.AH)(i||(i=(0,r.A)([".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}"])))]}}]);var t,a}(y.WF);(0,h.Cg)([(0,v.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,h.Cg)([(0,v.wk)()],C.prototype,"_params",void 0),C=(0,h.Cg)([(0,v.EM)("dialog-esphome-encryption-key")],C),a()}catch(x){a(x)}})}}]);
//# sourceMappingURL=56139.343ac341cd8f8505.js.map