'use strict';

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

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

const appLocationListCss = "";

let AppLocationList = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.filters = {};
  }
  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: "/locations" }, "Locations"), index.h("ion-buttons", { slot: "end" }, index.h("ion-button", { fill: "solid", color: "primary", href: "/locations/new" }, "Add"))), index.h("div", { class: "ion-padding" }, index.h("fireenjin-search-bar", { ref: (el) => (this.filterBarEl = el), paginationEl: this.paginationEl, filters: [
          {
            name: "locationId",
            label: "Location",
            endpoint: "listLocations",
            value: this.locationId,
            icon: "business",
            resultsKey: "locations",
          },
        ] })), index.h("fireenjin-pagination", { disableVirtualScroll: true, removeDuplicates: true, ref: (el) => (this.paginationEl = el), gridEl: ({ result }) => (index.h("floodteam-snapshot-card", { href: `/locations/${result.id}`, buttonText: "View Location", photo: result === null || result === void 0 ? void 0 : result.photo }, index.h("ion-label", null, index.h("h2", null, result.name ? result.name : "")))), listEl: ({ result }) => (index.h("ion-item", { href: `/locations/${result.id}`, detail: true }, index.h("ion-label", null, index.h("h2", null, result.name ? result.name : "", " ")))), endpoint: "listLocations", limit: 24, resultsKey: "locations", query: this.query })),
      index.h("floodteam-navigation-footer", null),
    ];
  }
};
AppLocationList.style = appLocationListCss;

exports.app_location_list = AppLocationList;

//# sourceMappingURL=app-location-list.cjs.entry.js.map