text: define(["exports", "../../../../@polymer/polymer/polymer-element.js", "../core/HAXCMSPolymerElementTheme.js", "../ui-components/active-item/site-active-title.js", "../ui-components/navigation/site-breadcrumb.js", "../ui-components/navigation/site-menu.js", "../ui-components/navigation/site-menu-button.js", "../ui-components/navigation/site-top-menu.js", "../ui-components/query/site-query.js", "../ui-components/query/site-render-query.js", "../ui-components/site/site-rss-button.js", "../ui-components/site/site-title.js", "../../../hax-body/lib/hax-store.js"], function (_exports, _polymerElement, _HAXCMSPolymerElementTheme, _siteActiveTitle, _siteBreadcrumb, _siteMenu, _siteMenuButton, _siteTopMenu, _siteQuery, _siteRenderQuery, _siteRssButton, _siteTitle, _haxStore) {
    "use strict";
  
    Object.defineProperty(_exports, "__esModule", {
      value: true
    });
    _exports.HAXCMSThemeDeveloper = void 0;
  
    var _templateObject_055f7270941811ec8d52c707f928eca0;
  
    function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
  
    function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  
    /**
     * `haxcms-dev-theme`
     * `This is a theme used to make new themes (wwaaaaaaa?)
     *
    
     * @polymer
     * @demo demo/index.html
     */
    var HAXCMSThemeDeveloper = /*#__PURE__*/function (_HAXCMSPolymerElement) {
      babelHelpers.inherits(HAXCMSThemeDeveloper, _HAXCMSPolymerElement);
  
      var _super = _createSuper(HAXCMSThemeDeveloper);
  
      function HAXCMSThemeDeveloper() {
        var _this;
  
        babelHelpers.classCallCheck(this, HAXCMSThemeDeveloper);
        _this = _super.call(this);
        _this.HAXWiring = new HAXWiring();
        return _this;
      }
  
      babelHelpers.createClass(HAXCMSThemeDeveloper, [{
        key: "_fireDefinitions",
        value:
        /**
         * this is gonna be fun
         */
        function _fireDefinitions(e) {
          var props = {
            canScale: true,
            canPosition: true,
            canEditSource: true,
            gizmo: {
              title: "HAXcms active title",
              description: "",
              icon: "icons:android",
              color: "pink",
              groups: ["Content", "HAXcms"],
              handles: [],
              meta: {
                author: "HAXcms"
              }
            },
            settings: {
              configure: [],
              advanced: []
            },
            saveOptions: {
              unsetAttributes: ["page-title"]
            }
          };
          this.HAXWiring.setHaxProperties(props, "site-active-title", this, true);
          props = {
            type: "element",
            editingElement: "core",
            canScale: true,
            canPosition: true,
            canEditSource: true,
            gizmo: {
              title: "HAXcms breadcrumb",
              description: "",
              icon: "icons:android",
              color: "pink",
              groups: ["Content", "HAXcms"],
              handles: [],
              meta: {
                author: "HAXcms"
              }
            },
            settings: {
              configure: [],
              advanced: []
            },
            saveOptions: {
              wipeSlot: false
            }
          };
          this.HAXWiring.setHaxProperties(props, "site-breadcrumb", this, true);
          props = {
            type: "element",
            editingElement: "core",
            canScale: true,
            canPosition: true,
            canEditSource: true,
            gizmo: {
              title: "HAXcms menu",
              description: "",
              icon: "icons:android",
              color: "pink",
              groups: ["Content", "HAXcms"],
              handles: [],
              meta: {
                author: "HAXcms"
              }
            },
            settings: {
              configure: [{
                property: "preventAutoScroll",
                title: "Prevent auto scroll",
                description: "If the menu should automatically scroll into view",
                inputMethod: "boolean"
              }, {
                property: "hideActiveIndicator",
                title: "Hide active indicator",
                description: "Hide active indicator that highlights the active item",
                inputMethod: "boolean"
              }],
              advanced: []
            },
            saveOptions: {
              wipeSlot: false,
              unsetAttributes: ["active-id"]
            }
          };
          this.HAXWiring.setHaxProperties(props, "site-menu", this, true);
          props = {
            type: "element",
            editingElement: "core",
            canScale: true,
            canPosition: true,
            canEditSource: true,
            gizmo: {
              title: "HAXcms menu button",
              description: "",
              icon: "icons:android",
              color: "pink",
              groups: ["Content", "HAXcms"],
              handles: [],
              meta: {
                author: "HAXcms"
              }
            },
            settings: {
              configure: [{
                property: "type",
                title: "Button type",
                description: "Which direction should the button be activating",
                inputMethod: "select",
                options: {
                  prev: "Previous",
                  next: "Next"
                }
              }, {
                property: "position",
                title: "Label position",
                description: "direction for the label to hang on hover",
                inputMethod: "select",
                options: {
                  left: "left",
                  right: "right",
                  above: "above",
                  below: "below"
                }
              }, {
                property: "label",
                title: "Label",
                description: "label to show on hover",
                inputMethod: "textfield"
              }, {
                property: "label",
                title: "Label",
                description: "label to show on hover",
                inputMethod: "textfield"
              }, {
                property: "icon",
                title: "Icon",
                description: "icon for the button",
                inputMethod: "iconpicker"
              }, {
                property: "raised",
                title: "Raised",
                description: "If this has a drop shadow or is flat",
                inputMethod: "boolean"
              }],
              advanced: []
            },
            saveOptions: {
              unsetAttributes: ["link"]
            }
          };
          this.HAXWiring.setHaxProperties(props, "site-menu-button", this, true);
          props = {
            type: "element",
            editingElement: "core",
            canScale: true,
            canPosition: true,
            canEditSource: true,
            gizmo: {
              title: "HAXcms RSS button",
              description: "",
              icon: "icons:android",
              color: "pink",
              groups: ["Content", "HAXcms"],
              handles: [],
              meta: {
                author: "HAXcms"
              }
            },
            settings: {
              configure: [{
                property: "type",
                title: "Button type",
                description: "What feed to point",
                inputMethod: "select",
                options: {
                  rss: "RSS 2.0",
                  atom: "Atom 1.0"
                }
              }],
              advanced: []
            },
            saveOptions: {
              unsetAttributes: ["icon", "label", "href"]
            }
          };
          this.HAXWiring.setHaxProperties(props, "site-rss-button", this, true);
          props = {
            type: "element",
            editingElement: "core",
            canScale: true,
            canPosition: true,
            canEditSource: true,
            gizmo: {
              title: "HAXcms title",
              description: "",
              icon: "icons:android",
              color: "pink",
              groups: ["Content", "HAXcms"],
              handles: [],
              meta: {
                author: "HAXcms"
              }
            },
            settings: {
              configure: [],
              advanced: []
            },
            saveOptions: {
              unsetAttributes: ["site-title", "home-link"]
            }
          };
          this.HAXWiring.setHaxProperties(props, "site-title", this, true);
          props = {
            type: "element",
            editingElement: "core",
            canScale: true,
            canPosition: true,
            canEditSource: true,
            gizmo: {
              title: "HAXcms query",
              description: "The most powerful element in the known universe",
              icon: "icons:android",
              color: "pink",
              groups: ["Content", "HAXcms"],
              handles: [],
              meta: {
                author: "HAXcms"
              }
            },
            settings: {
              configure: [{
                property: "conditions",
                title: "Conditions",
                description: "A JSON object of conditions",
                inputMethod: "code-editor"
              }, {
                property: "sort",
                title: "Sort",
                description: "A JSON object of sort conditions",
                inputMethod: "code-editor"
              }, {
                property: "grid",
                title: "Display as grid",
                description: "Flex vs display block for all items.",
                inputMethod: "boolean"
              }, {
                slot: "",
                slotWrapper: "template",
                slotAttributes: {
                  "preserve-content": "preserve-content"
                },
                title: "Tag to render",
                description: "Render through this per item",
                inputMethod: "code-editor"
              }],
              advanced: []
            },
            saveOptions: {
              wipeSlot: false,
              unsetAttributes: ["active-id"]
            }
          };
          this.HAXWiring.setHaxProperties(props, "site-query", this, true);
        }
      }, {
        key: "connectedCallback",
        value: function connectedCallback() {
          babelHelpers.get(babelHelpers.getPrototypeOf(HAXCMSThemeDeveloper.prototype), "connectedCallback", this).call(this); // account for switching to this theme
  
          if (_haxStore.HAXStore.ready) {
            this._setDefinitions();
          }
  
          window.addEventListener("hax-store-ready", this._fireDefinitions.bind(this));
        }
      }, {
        key: "disconnectedCallback",
        value: function disconnectedCallback() {
          babelHelpers.get(babelHelpers.getPrototypeOf(HAXCMSThemeDeveloper.prototype), "disconnectedCallback", this).call(this);
          window.removeEventListener("hax-store-ready", this._fireDefinitions.bind(this));
        }
      }], [{
        key: "tag",
        get:
        /**
         * Store the tag name to make it easier to obtain directly.
         */
        function get() {
          return "haxcms-theme-developer";
        } // render function
  
      }, {
        key: "template",
        get: function get() {
          return (0, _polymerElement.html)(_templateObject_055f7270941811ec8d52c707f928eca0 || (_templateObject_055f7270941811ec8d52c707f928eca0 = babelHelpers.taggedTemplateLiteral(["\n      <style>\n        :host {\n          display: block;\n          /* theme color which is dictated by the manifest */\n          background-color: var(--haxcms-color, black);\n        }\n        /**\n         * Hide the slotted content during edit mode. This must be here to work.\n         */\n        :host([edit-mode]) #slot {\n          display: none;\n        }\n      </style>\n      <div id=\"contentcontainer\">\n        <div id=\"slot\"></div>\n      </div>\n    "])));
        }
      }]);
      return HAXCMSThemeDeveloper;
    }(_HAXCMSPolymerElementTheme.HAXCMSPolymerElementTheme);
  
    _exports.HAXCMSThemeDeveloper = HAXCMSThemeDeveloper;
    window.customElements.define(HAXCMSThemeDeveloper.tag, HAXCMSThemeDeveloper);
  });