import { isDemo } from "@saasquatch/component-boilerplate";
import { withHooks } from "@saasquatch/stencil-hooks";
import { Component, Prop, State } from "@stencil/core";
import { usePortalLogout } from "./usePortalLogout";
/**
 * @uiName Microsite Logout
 * @validParents ["sqm-portal-container","div","sqm-divided-layout","sqm-brand","template"]
 * @compatibility Built for instant access
 */
export class PortalLogout {
  constructor() {
    this.ignored = true;
    /**
     * Redirect participants to this page when they log out.
     *
     * @uiName Logout redirect path
     * @uiWidget pageSelect
     */
    this.nextPage = "/";
    withHooks(this);
  }
  disconnectedCallback() { }
  render() {
    isDemo() ? useLogoutDemo(this) : usePortalLogout(this);
  }
  static get is() { return "sqm-portal-logout"; }
  static get encapsulation() { return "shadow"; }
  static get properties() { return {
    "nextPage": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Logout redirect path",
            "name": "uiName"
          }, {
            "text": "pageSelect",
            "name": "uiWidget"
          }],
        "text": "Redirect participants to this page when they log out."
      },
      "attribute": "next-page",
      "reflect": false,
      "defaultValue": "\"/\""
    }
  }; }
  static get states() { return {
    "ignored": {}
  }; }
}
function useLogoutDemo({}) { }
