/**
 * Copyright 2019 The Pennsylvania State University
 * @license Apache-2.0, see License.md for full text.
 */
import{LitElement as t,html as e,css as s}from"../../../../../lit/index.js";import"../../../../../@polymer/iron-list/iron-list.js";import"./site-query.js";class SiteRenderQuery extends t{static get styles(){return[s`
        :host {
          display: block;
        }
      `]}static get tag(){return"site-render-query"}render(){return e`
      <site-query
        .result="${this.result}"
        @result-changed="${this.resultEvent}"
        .sort="${this.sort}"
        .conditions="${this.conditions}"
      ></site-query>
      <iron-list
        id="list"
        .items="${this.__items}"
        ?grid="${this.grid}"
        mutable-data
      >
        <slot></slot>
      </iron-list>
    `}resultEvent(t){this.result=[...t.detail.value]}static get properties(){return{conditions:{type:Object},sort:{type:Object},grid:{type:Boolean},result:{type:Array},__items:{type:Array}}}constructor(){super(),this.conditions={},this.sort={},this.grid=!1,this.result=[],this.__items=[]}updated(t){t.forEach(((t,e)=>{"result"==e&&(this.dispatchEvent(new CustomEvent("result-changed",{detail:{value:this[e]}})),this.__items=[...newValue])}))}}customElements.define(SiteRenderQuery.tag,SiteRenderQuery);export{SiteRenderQuery};