'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-ee190ee0.js');

const appMoistureContentListCss = "";

const AppMoistureContentList = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.paginationEl = undefined;
    this.query = undefined;
  }
  onSearchInput(event) {
    this.query = event.target.value;
  }
  componentDidLoad() {
    if (!(index.Build === null || index.Build === void 0 ? void 0 : index.Build.isBrowser))
      return;
  }
  render() {
    return [
      index.h("ion-content", { class: "ion-padding" }, index.h("floodteam-title-bar", null, index.h("ion-router-link", { href: "/moisturecontents" }, "MC Readings"), index.h("ion-buttons", { slot: "end" }, index.h("ion-button", { fill: "solid", color: "primary", href: "/moisturecontents/new" }, "Add"))), index.h("div", { class: "ion-padding" }, index.h("fireenjin-search-bar", { ref: (el) => (this.filterBarEl = el), paginationEl: this.paginationEl, filters: null })), index.h("fireenjin-filter-bar", { paginationEl: this.paginationEl, modeToggle: true, filter: {
          label: "Filter By",
          controls: [
            {
              name: "locationId",
              label: "Location",
              endpoint: "listLocations",
              icon: "business",
              resultsKey: "locations",
            },
          ],
        }, sort: {
          header: "Sort By",
          value: "createdAt:desc",
          options: [
            {
              label: "Created At",
              value: "createdAt:desc",
            },
            {
              label: "Name",
              value: "name",
            },
          ],
        } }), index.h("fireenjin-pagination", { ref: (el) => (this.paginationEl = el), gridEl: ({ result }) => (index.h("floodteam-snapshot-card", { href: `/moisturecontent/${result.id}`, buttonText: "View MoistureContent" }, index.h("ion-label", null, index.h("h2", null, result.id ? result.id : "")))), listEl: ({ result }) => (index.h("ion-item", { href: `/moisturecontent/${result.id}`, detail: true }, index.h("ion-label", null, index.h("h2", null, result.id ? result.id : "")))), endpoint: "listMoistureContents", limit: 20, resultsKey: "moistureContents", query: this.query, name: "moistureContents" })),
      index.h("floodteam-navigation-footer", null),
    ];
  }
};
AppMoistureContentList.style = appMoistureContentListCss;

exports.app_moisture_content_list = AppMoistureContentList;
