import { withHooks } from "@saasquatch/stencil-hooks";
import { Component, Host, Prop, State, h } from "@stencil/core";
import { getProps } from "../../utils/utils";
import { useContextRouter } from "./useContextRouter";
/**
 * @uiName Context Router
 * @slots [{"name":"","title":"Routes"}]
 */
export class SqmContextRouter {
  constructor() {
    this.ignored = true;
    withHooks(this);
  }
  disconnectedCallback() { }
  render() {
    const { callbacks } = useContextRouter(getProps(this));
    return (h(Host, null,
      h("div", { ref: callbacks.setSlot, style: { display: "none" } },
        h("slot", null)),
      h("div", { style: { display: "contents" }, ref: callbacks.setContainer })));
  }
  static get is() { return "sqm-context-router"; }
  static get originalStyleUrls() { return {
    "$": ["sqm-context-router.css"]
  }; }
  static get styleUrls() { return {
    "$": ["sqm-context-router.css"]
  }; }
  static get properties() { return {
    "contextName": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "context-name",
      "reflect": false
    }
  }; }
  static get states() { return {
    "ignored": {}
  }; }
}
