"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9978],{9978:(e,o,t)=>{t.r(o),t.d(o,{default:()=>v});var r=t(10467),a=t(52749),n=t(74431),i=t(15324),g=t(86654),u=t(32832),s=t(42370),l=t(54438),c=t(2910),d=t(64422),C=t(88246);let v=(()=>{var e;class CoreLoginLogoutPage{ngOnInit(){var e=this;return(0,r.A)((function*(){var o,t;const r=null!==(o=i.CoreNavigator.getRouteParam("siteId"))&&void 0!==o?o:n.CoreConstants.NO_SITE_ID,g={forceLogout:i.CoreNavigator.getRouteBooleanParam("forceLogout"),removeAccount:null!==(t=i.CoreNavigator.getRouteBooleanParam("removeAccount"))&&void 0!==t?t:!!n.CoreConstants.CONFIG.removeaccountonlogout},l={redirectPath:i.CoreNavigator.getRouteParam("redirectPath"),redirectOptions:i.CoreNavigator.getRouteParam("redirectOptions"),urlToOpen:i.CoreNavigator.getRouteParam("urlToOpen")};if(!a.CoreSites.getCurrentSite())return yield e.navigateAfterLogout(r,l),void 0;const c=u.CoreSitePlugins.hasSitePluginsLoaded;if(c&&(r!==n.CoreConstants.NO_SITE_ID||l.redirectPath||l.urlToOpen)&&s.p.storeRedirect(r,l),yield a.CoreSites.internalLogout(g),c)return yield i.CoreNavigator.navigate("/login",{reset:!0}),window.location.reload(),void 0;yield e.navigateAfterLogout(r,l)}))()}navigateAfterLogout(e,o){return(0,r.A)((function*(){var t;if(e===n.CoreConstants.NO_SITE_ID)return yield i.CoreNavigator.navigate(null!==(t=o.redirectPath)&&void 0!==t?t:"/login/sites",{...o.redirectOptions,reset:!0}),void 0;(yield a.CoreSites.loadSite(e,o))&&(yield i.CoreNavigator.navigateToSiteHome({params:o,preferCurrentTab:!1,siteId:e}))}))()}}return(e=CoreLoginLogoutPage).ɵfac=function CoreLoginLogoutPage_Factory(o){return new(o||e)},e.ɵcmp=l.VBU({type:e,selectors:[["page-core-login-logout"]],standalone:!0,features:[l.aNF],decls:2,vars:0,template:function CoreLoginLogoutPage_Template(e,o){1&e&&(l.j41(0,"ion-content"),l.nrm(1,"core-loading"),l.k0s())},dependencies:[g.n,c.W9,d.R,C.i],encapsulation:2}),CoreLoginLogoutPage})()}}]);