'use strict';

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

const index = require('./index-fd2bbf0b.js');
const store = require('./store-d6f21087.js');
require('./index-81aa1bcb.js');
require('./getHandlebarsHelpers-7b2b1728.js');
require('./_commonjsHelpers-a5111d61.js');
require('./logic-d8c34975.js');
require('./index-1f381af8.js');
require('./localforage-af1b8c0e.js');

const itemSiteCss = "floodteam-item-site h3,floodteam-item-site ion-text{display:block;text-indent:10px}floodteam-item-site ion-label{margin-top:5px;margin-bottom:0px;text-transform:capitalize}floodteam-item-site ion-grid ion-chip{padding:0px 15px;--background:transparent;--color:var(--ion-text-color);opacity:0.5}floodteam-item-site ion-chip ion-icon{height:15px;width:15px;color:var(--ion-text-color)}floodteam-item-site ion-grid,floodteam-item-site ion-grid ion-row,floodteam-item-site ion-grid ion-row ion-col{padding:0;margin:0}";

let ItemSite = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.floodteamOpenSiteEditModal = index.createEvent(this, "floodteamOpenSiteEditModal", 7);
    this.detail = true;
    this.disabled = false;
  }
  openTab(event, selectedTab) {
    event.stopPropagation();
    event.preventDefault();
    store.state.site = this.site;
    this.floodteamOpenSiteEditModal.emit({
      selectedTab,
      site: this.site,
    });
  }
  render() {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j;
    return (index.h(index.Host, null, index.h("ion-item", { detail: this.detail, href: this.href, disabled: this.disabled }, index.h("ion-label", null, index.h("h3", null, ((_a = this.site) === null || _a === void 0 ? void 0 : _a.name) ? this.site.name : "Common"), index.h("ion-grid", null, index.h("ion-row", null, index.h("ion-col", { size: "3" }, index.h("ion-chip", { onClick: (event) => this.openTab(event, "photos") }, index.h("ion-icon", { name: "images" }), index.h("ion-label", null, ((_c = (_b = this.site) === null || _b === void 0 ? void 0 : _b.photos) === null || _c === void 0 ? void 0 : _c.length) ? this.site.photos.length : 0))), index.h("ion-col", { size: "3" }, index.h("ion-chip", { onClick: (event) => this.openTab(event, "info") }, index.h("ion-icon", { name: "construct" }), index.h("ion-label", null, ((_e = (_d = this.site) === null || _d === void 0 ? void 0 : _d.equipment) === null || _e === void 0 ? void 0 : _e.length)
      ? this.site.equipment.length
      : 0))), index.h("ion-col", { size: "3" }, index.h("ion-chip", { onClick: (event) => this.openTab(event, "info") }, index.h("ion-icon", { name: "reader" }), index.h("ion-label", null, ((_g = (_f = this.site) === null || _f === void 0 ? void 0 : _f.services) === null || _g === void 0 ? void 0 : _g.length)
      ? this.site.services.length
      : 0))), index.h("ion-col", { size: "3" }, index.h("ion-chip", { onClick: (event) => this.openTab(event, "dots") }, index.h("ion-icon", { name: "ellipse" }), index.h("ion-label", null, ((_j = (_h = this.site) === null || _h === void 0 ? void 0 : _h.dots) === null || _j === void 0 ? void 0 : _j.length) ? this.site.dots.length : 0)))))))));
  }
};
ItemSite.style = itemSiteCss;

exports.floodteam_item_site = ItemSite;

//# sourceMappingURL=floodteam-item-site.cjs.entry.js.map