import { Build, Component, h, Listen, State, } from "@stencil/core";
export class AppTotallerList {
  onSuccess() {
    if (!(Build === null || Build === void 0 ? void 0 : Build.isBrowser))
      return;
    setTimeout(() => {
      window.dispatchEvent(new Event("resize"));
    }, 400);
  }
  componentDidLoad() {
    if (!(Build === null || Build === void 0 ? void 0 : Build.isBrowser))
      return;
  }
  render() {
    return [
      h("ion-content", { class: "ion-padding" },
        h("floodteam-title-bar", null,
          h("ion-router-link", { href: "/totallers" }, "Totallers"),
          h("ion-buttons", { slot: "end" },
            h("ion-button", { fill: "solid", color: "primary", href: "/totallers/new" }, "Add"))),
        h("div", { class: "ion-padding" },
          h("fireenjin-search-bar", { ref: (el) => (this.filterBarEl = el), paginationEl: this.paginationEl, filters: null })),
        h("fireenjin-pagination", { ref: (el) => (this.paginationEl = el), disableVirtualScroll: true, removeDuplicates: true, listEl: ({ result: totaller }) => (h("ion-item", { href: `/totallers/${totaller.id}`, detail: true, lines: "full" },
            h("ion-label", null,
              h("h2", null, totaller.name)))), display: "list", endpoint: "listTotallers", limit: 30, resultsKey: "totallers", query: this.query })),
      h("floodteam-navigation-footer", null),
    ];
  }
  static get is() { return "app-totaller-list"; }
  static get originalStyleUrls() { return {
    "$": ["app-totaller-list.css"]
  }; }
  static get styleUrls() { return {
    "$": ["app-totaller-list.css"]
  }; }
  static get states() { return {
    "query": {},
    "paginationEl": {}
  }; }
  static get listeners() { return [{
      "name": "fireenjinSuccess",
      "method": "onSuccess",
      "target": "body",
      "capture": false,
      "passive": false
    }]; }
}
//# sourceMappingURL=app-totaller-list.js.map