import { r as registerInstance, h, H as Host } from './index-67f7ec52.js';
import { o as oidcService, a as appConfigurationService } from './authentication.service-905f97c2.js';
import './Option-53ef163a.js';
import './index-6869168f.js';
import './datorama-akita-d2413fd0.js';
import './scheduleArray-b9669898.js';
import './delay-d08c267f.js';
import './filter-aeb65cac.js';

const OidcCallbackPage = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  async componentWillLoad() {
    switch (this.callbackMode) {
      case 'sign-in':
        await oidcService.signInRedirectCallbackAsync();
        this.navigateToHomePage();
        break;
      case 'sign-out':
        await oidcService.signOutRedirectCallbackAsync();
        break;
      case 'silent-refresh':
        await oidcService.silentRefreshCallbackAsync();
        break;
    }
  }
  render() {
    return h(Host, null);
  }
  navigateToHomePage() {
    this.history.replace(appConfigurationService.getAppRootUrl());
  }
};

export { OidcCallbackPage as ap_ben_oidc_callback_page };
