"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[57406],{74840:function(e,o,i){var n=i(57567),t=i(25979),a=i(12463),s=i(40227),l=i(16472),c=i(92297),r=(i(28706),i(26099),i(3362),i(148)),d=function(e){var o=function(e){function o(){var e;(0,n.A)(this,o);for(var i=arguments.length,t=new Array(i),a=0;a<i;a++)t[a]=arguments[a];return(e=(0,l.A)(this,o,[].concat(t))).dialogNext=!0,e._dialogClosedFired=!1,e._removeDialog=function(o){var i,n;o.stopPropagation(),null===(i=(n=e)._closeResolve)||void 0===i||i.call(n,!0),e._closePromise=void 0,e._closeResolve=void 0,e._dialogClosedFired=!0,(0,r.r)((0,s.A)(e),"dialog-closed",{dialog:e.localName}),e.remove()},e}return(0,a.A)(o,e),(0,t.A)(o,[{key:"closeDialog",value:function(e){var o,i=this;if(this._closePromise)return this._closePromise;var n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector("ha-adaptive-popover, ha-adaptive-dialog, ha-dialog, ha-bottom-sheet");return n&&(this._closePromise=new Promise(function(e){i._closeResolve=e}),n.open=!1),this._closePromise||!0}},{key:"connectedCallback",value:function(){(0,c.A)(o,"connectedCallback",this,3)([]),this.addEventListener("closed",this._removeDialog,{once:!0})}},{key:"disconnectedCallback",value:function(){this._dialogClosedFired||(0,r.r)(this,"dialog-closed",{dialog:this.localName}),this.removeEventListener("closed",this._removeDialog),(0,c.A)(o,"disconnectedCallback",this,3)([])}}])}(e);return o};i.d(o,{O:function(){return d}})},69101:function(e,o,i){i.a(e,async function(e,n){try{i.r(o);var t,a,s=i(36854),l=i(98117),c=i(28430),r=i(57567),d=i(25979),h=i(12463),u=i(16472),g=i(92297),f=(i(26099),i(3362),i(15697)),_=i(358),v=i(57527),p=i(51209),m=i(73651),k=(i(90507),i(98747)),b=i(80189),y=i(57255),A=i(74840),C=e([m,k]);[m,k]=C.then?(await C)():C;var w=function(e){function o(){return(0,r.A)(this,o),(0,u.A)(this,o,arguments)}return(0,h.A)(o,e),(0,d.A)(o,[{key:"connectedCallback",value:function(){(0,g.A)(o,"connectedCallback",this,3)([]),this._loadBackendLocalize()}},{key:"render",value:function(){return this.params&&this._backendLocalize?(0,v.qy)(t||(t=(0,c.A)([" <ha-dialog open .headerTitle=","> ",' <ha-dialog-footer slot="footer"> <ha-button appearance="plain" slot="secondaryAction" @click=',"> ",' </ha-button> <ha-button slot="primaryAction" .href=',"> "," </ha-button> </ha-dialog-footer> </ha-dialog> "])),this._i18n.localize("ui.panel.config.integrations.config_flow.single_config_entry_title"),this._i18n.localize("ui.panel.config.integrations.config_flow.single_config_entry",{integration_name:(0,v.qy)(a||(a=(0,c.A)(["<b>","</b>"])),(0,y.p$)(this._backendLocalize,this.params.domain))}),this.closeDialog,this._i18n.localize("ui.common.close"),"/config/integrations/integration/".concat(this.params.domain),this._i18n.localize("ui.panel.config.integrations.config_flow.show_integration")):v.s6}},{key:"_loadBackendLocalize",value:(i=(0,l.A)((0,s.A)().m(function e(){return(0,s.A)().w(function(e){for(;;)switch(e.n){case 0:if(this.params){e.n=1;break}return e.a(2);case 1:return e.n=2,this._i18n.loadBackendTranslation("title",this.params.domain);case 2:this._backendLocalize=e.v;case 3:return e.a(2)}},e,this)})),function(){return i.apply(this,arguments)})}]);var i}((0,A.O)(v.WF));(0,f.Cg)([(0,p.wk)(),(0,_.Fg)({context:b.D5,subscribe:!0})],w.prototype,"_i18n",void 0),(0,f.Cg)([(0,p.wk)()],w.prototype,"_backendLocalize",void 0),w=(0,f.Cg)([(0,p.EM)("dialog-single-config-entry-warning")],w),n()}catch(z){n(z)}})}}]);
//# sourceMappingURL=57406.8de44f229acb5f1f.js.map