import { r as registerInstance } from './index-38ad4957.js';
import { n as h } from './dom-context-hooks.module-50442785.js';
import { s as setUserIdentity, j as jn, i as isDemo } from './index.module-b23fdad8.js';

function usePortalLogout({ nextPage }) {
  setUserIdentity(undefined);
  jn.push({ pathname: nextPage, search: "" });
}

const PortalLogout = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.ignored = true;
    /**
     * Redirect participants to this page when they log out.
     *
     * @uiName Logout redirect path
     * @uiWidget pageSelect
     */
    this.nextPage = "/";
    h(this);
  }
  disconnectedCallback() { }
  render() {
    isDemo() ? useLogoutDemo() : usePortalLogout(this);
  }
};
function useLogoutDemo({}) { }

export { PortalLogout as sqm_portal_logout };
