/**
 * Copyright 2018 The Pennsylvania State University
 * @license Apache-2.0, see License.md for full text.
 */
import{html as t}from"../../../../@polymer/polymer/polymer-element.js";import{HAXCMSPolymerElementTheme as e}from"../core/HAXCMSPolymerElementTheme.js";import"../ui-components/active-item/site-active-title.js";import"../ui-components/navigation/site-breadcrumb.js";import"../ui-components/navigation/site-menu.js";import"../ui-components/navigation/site-menu-button.js";import"../ui-components/navigation/site-top-menu.js";import"../ui-components/query/site-query.js";import"../ui-components/site/site-rss-button.js";import"../ui-components/site/site-title.js";import{HAXStore as i}from"../../../hax-body/lib/hax-store.js";class HAXCMSThemeDeveloper extends e{static get tag(){return"haxcms-theme-developer"}static get template(){return t`
      <style>
        :host {
          display: block;
          /* theme color which is dictated by the manifest */
          background-color: var(--haxcms-color, black);
        }
        /**
         * Hide the slotted content during edit mode. This must be here to work.
         */
        :host([edit-mode]) #slot {
          display: none;
        }
      </style>
      <div id="contentcontainer">
        <div id="slot"></div>
      </div>
    `}_fireDefinitions(t){let e={canScale:!0,canEditSource:!0,gizmo:{title:"HAXcms active title",description:"",icon:"icons:android",color:"pink",tags:["Other","haxcms"],handles:[],meta:{author:"HAXcms"}},settings:{configure:[],advanced:[]},saveOptions:{unsetAttributes:["page-title"]}};this.HAXWiring.setHaxProperties(e,"site-active-title",this,!0),e={type:"element",editingElement:"core",canScale:!0,canEditSource:!0,gizmo:{title:"HAXcms breadcrumb",description:"",icon:"icons:android",color:"pink",tags:["Other","haxcms"],handles:[],meta:{author:"HAXcms"}},settings:{configure:[],advanced:[]},saveOptions:{wipeSlot:!1}},this.HAXWiring.setHaxProperties(e,"site-breadcrumb",this,!0),e={type:"element",editingElement:"core",canScale:!0,canEditSource:!0,gizmo:{title:"HAXcms menu",description:"",icon:"icons:android",color:"pink",tags:["Other","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:!1,unsetAttributes:["active-id"]}},this.HAXWiring.setHaxProperties(e,"site-menu",this,!0),e={type:"element",editingElement:"core",canScale:!0,canEditSource:!0,gizmo:{title:"HAXcms menu button",description:"",icon:"icons:android",color:"pink",tags:["Other","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(e,"site-menu-button",this,!0),e={type:"element",editingElement:"core",canScale:!0,canEditSource:!0,gizmo:{title:"HAXcms RSS button",description:"",icon:"icons:android",color:"pink",tags:["Other","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(e,"site-rss-button",this,!0),e={type:"element",editingElement:"core",canScale:!0,canEditSource:!0,gizmo:{title:"HAXcms title",description:"",icon:"icons:android",color:"pink",tags:["Other","haxcms"],handles:[],meta:{author:"HAXcms"}},settings:{configure:[],advanced:[]},saveOptions:{unsetAttributes:["site-title","home-link"]}},this.HAXWiring.setHaxProperties(e,"site-title",this,!0),e={type:"element",editingElement:"core",canScale:!0,canEditSource:!0,gizmo:{title:"HAXcms query",description:"The most powerful element in the known universe",icon:"icons:android",color:"pink",tags:["Other","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:!1,unsetAttributes:["active-id"]}},this.HAXWiring.setHaxProperties(e,"site-query",this,!0)}constructor(){super(),this.windowControllers=new AbortController,this.HAXWiring=new HAXWiring}connectedCallback(){super.connectedCallback(),i.ready&&this._setDefinitions(),globalThis.addEventListener("hax-store-ready",this._fireDefinitions.bind(this),{signal:this.windowControllers.signal})}disconnectedCallback(){super.disconnectedCallback(),this.windowControllers.abort()}}customElements.define(HAXCMSThemeDeveloper.tag,HAXCMSThemeDeveloper);export{HAXCMSThemeDeveloper};