import { popoverController } from "@ionic/core";
import { Build, Component, Event, h, Listen, Prop, State, } from "@stencil/core";
import state from "../../../store";
export class ModalTakeReadings {
  constructor() {
    this.steps = [
      {
        tab: "weather",
        name: "Weather",
        label: "Get Weather",
        icon: "rainy",
      },
      {
        tab: "dots",
        name: "MC Dots",
        label: "Take Moisture Content Readings",
        icon: "ellipse",
      },
      {
        tab: "equipment",
        name: "Equipment",
        label: "Take Equipment Readings",
        icon: "construct",
      },
      {
        tab: "atmospheric",
        name: "Atmospheric",
        label: "Take Atmospheric Readings",
        icon: "cloud-circle-outline",
      },
    ];
    this.dotForm = false;
    this.closeOnFinish = false;
    this.started = false;
    this.completed = false;
    this.actionQueue = [];
    this.dotSiteMap = {};
    this.equipmentSiteMap = {};
  }
  onSubmit(event) {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
    if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.name) === "weather") {
      this.tabsEl.select("dots");
    }
    else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.name) === "atmospheric") {
      if (!((_d = (_c = event === null || event === void 0 ? void 0 : event.detail) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.chamber)) {
        alert("Chamber readings required!");
        return;
      }
      for (const [chamber, { temperature, humidity }] of Object.entries(event.detail.data.chamber)) {
        const action = {
          endpoint: "addAtmospheric",
          params: {
            data: {
              jobId: this.jobId,
              chamber: chamber ? Number(chamber) : 0,
              temperature: temperature ? Number(temperature) : 0,
              humidity: humidity ? Number(humidity) : 0,
            },
          },
        };
        this.fireenjinFetch.emit(action);
        this.actionQueue.push(action);
      }
    }
    else if (((_e = event === null || event === void 0 ? void 0 : event.target) === null || _e === void 0 ? void 0 : _e.name) === "moisture") {
      if (!((_g = (_f = event === null || event === void 0 ? void 0 : event.detail) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.dot)) {
        alert("Moisture Content readings required!");
        return;
      }
      for (const [dotId, { temperature, readings }] of Object.entries(event.detail.data.dot)) {
        const action = {
          endpoint: "addMoistureContent",
          params: {
            data: {
              dotId,
              jobId: this.jobId,
              siteId: this.dotSiteMap[dotId],
              temperature: temperature ? Number(temperature) : 0,
              readings: readings
                ? readings.split(",").map((reading) => parseFloat(reading))
                : [],
            },
          },
        };
        this.fireenjinFetch.emit(action);
        this.actionQueue.push(action);
      }
    }
    else if (((_h = event === null || event === void 0 ? void 0 : event.target) === null || _h === void 0 ? void 0 : _h.name) === "equipment") {
      if (!((_k = (_j = event === null || event === void 0 ? void 0 : event.detail) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.equipment)) {
        alert("Exhaust readings required!");
        return;
      }
      for (const [equipmentId, { inletTemperature, inletHumidity, inletGrainsPerPound, outletTemperature, outletHumidity, outletGrainsPerPound, },] of Object.entries(event.detail.data.equipment)) {
        const action = {
          endpoint: "addExhaust",
          params: {
            data: {
              equipmentId,
              jobId: this.jobId,
              siteId: this.equipmentSiteMap[equipmentId],
              inletTemperature: inletTemperature ? Number(inletTemperature) : 0,
              inletHumidity: inletHumidity ? Number(inletHumidity) : 0,
              inletGrainsPerPound: inletGrainsPerPound
                ? Number(inletGrainsPerPound)
                : 0,
              outletTemperature: outletTemperature
                ? Number(outletTemperature)
                : 0,
              outletHumidity: outletHumidity ? Number(outletHumidity) : 0,
              outletGrainsPerPound: outletGrainsPerPound
                ? Number(outletGrainsPerPound)
                : 0,
            },
          },
        };
        this.fireenjinFetch.emit(action);
        this.actionQueue.push(action);
      }
    }
  }
  async onSuccess(event) {
    var _a, _b;
    if (event.detail.endpoint === "findJob") {
      this.job = (_b = (_a = event === null || event === void 0 ? void 0 : event.detail) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.job;
      this.setReadingData();
    }
    else if (event.detail.endpoint === "addWeather") {
      this.fetchJob();
    }
    else if (event.detail.endpoint === "addAtmospheric") {
      const actionQueue = this.actionQueue;
      actionQueue.pop();
      this.actionQueue = actionQueue;
      this.tabsEl.select("dots");
      this.fetchJob();
    }
    else if (event.detail.endpoint === "addMoistureContent") {
      const actionQueue = this.actionQueue;
      actionQueue.pop();
      this.actionQueue = actionQueue;
      this.tabsEl.select("equipment");
      this.fetchJob();
    }
    else if (event.detail.endpoint === "addExhaust") {
      const actionQueue = this.actionQueue;
      actionQueue.pop();
      this.actionQueue = actionQueue;
      this.fetchJob();
      this.tabsEl.select("atmospheric");
    }
    else if (event.detail.endpoint === "addDot") {
      this.fetchJob();
      this.dotForm = false;
      if (this.closeOnFinish)
        this.floodteamCloseModal.emit();
    }
  }
  async onReset(event) {
    var _a, _b, _c, _d, _e;
    if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.name) === "weather") {
      event.preventDefault();
      this.started = false;
    }
    else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.name) === "atmospheric") {
      this.tabsEl.select("equipment");
    }
    else if (((_c = event === null || event === void 0 ? void 0 : event.target) === null || _c === void 0 ? void 0 : _c.name) === "moisture") {
      this.tabsEl.select("weather");
    }
    else if (((_d = event === null || event === void 0 ? void 0 : event.target) === null || _d === void 0 ? void 0 : _d.name) === "equipment") {
      this.tabsEl.select("dots");
    }
    else if (((_e = event === null || event === void 0 ? void 0 : event.target) === null || _e === void 0 ? void 0 : _e.name) === "dot") {
      if (this.closeOnFinish)
        this.floodteamCloseModal.emit();
      this.dotForm = false;
    }
  }
  formatDate(date) {
    const d = typeof date === "string" ? new Date(date) : date;
    let month = "" + (d.getMonth() + 1);
    let day = "" + d.getDate();
    const year = d.getFullYear();
    if (month.length < 2)
      month = "0" + month;
    if (day.length < 2)
      day = "0" + day;
    return [year, month, day].join("-");
  }
  setReadingData() {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
    const readings = {};
    for (const reading of ((_a = state === null || state === void 0 ? void 0 : state.job) === null || _a === void 0 ? void 0 : _a.readings) ? state === null || state === void 0 ? void 0 : state.job.readings : []) {
      if (!(reading === null || reading === void 0 ? void 0 : reading.name))
        continue;
      readings[reading.name] = reading;
    }
    this.readings = readings;
    this.temperature =
      ((_d = (_c = (_b = this.readings) === null || _b === void 0 ? void 0 : _b[this.selectedDay]) === null || _c === void 0 ? void 0 : _c.weather) === null || _d === void 0 ? void 0 : _d.temperature) || null;
    this.humidity =
      ((_g = (_f = (_e = this.readings) === null || _e === void 0 ? void 0 : _e[this.selectedDay]) === null || _f === void 0 ? void 0 : _f.weather) === null || _g === void 0 ? void 0 : _g.humidity) || null;
    this.zip = ((_j = (_h = state === null || state === void 0 ? void 0 : state.job) === null || _h === void 0 ? void 0 : _h.address) === null || _j === void 0 ? void 0 : _j.zip) || this.zip || null;
    for (const site of ((_k = state === null || state === void 0 ? void 0 : state.job) === null || _k === void 0 ? void 0 : _k.sites) || []) {
      for (const dot of ((_l = site === null || site === void 0 ? void 0 : site.dots) === null || _l === void 0 ? void 0 : _l.length) ? site.dots : []) {
        this.dotSiteMap[dot.id] = site.id;
      }
      for (const equipment of ((_m = site === null || site === void 0 ? void 0 : site.equipment) === null || _m === void 0 ? void 0 : _m.length) ? site.equipment : []) {
        this.equipmentSiteMap[equipment.id] = equipment.id;
      }
    }
  }
  onTabClick(tabName) {
    let stopUnderline = false;
    this.tabBarEl.querySelectorAll("ion-tab-button").forEach((tabButtonEl) => {
      tabButtonEl.style.borderBottom = "none";
      if (tabName === tabButtonEl.tab)
        stopUnderline = true;
      if (!stopUnderline)
        tabButtonEl.style.borderBottom = "2px solid var(--ion-color-success)";
    });
  }
  getChambers() {
    var _a, _b;
    const chambers = [];
    if ((_b = (_a = this.job) === null || _a === void 0 ? void 0 : _a.sites) === null || _b === void 0 ? void 0 : _b.length)
      this.job.sites.map((site) => !isNaN(site.chamber) &&
        !chambers.includes(site.chamber) &&
        chambers.push(site.chamber));
    return chambers;
  }
  async fetchJob() {
    if (!this.jobId)
      return;
    this.fireenjinFetch.emit({
      endpoint: "findJob",
      params: {
        id: this.jobId,
        withPayments: false,
        withUsers: true,
        withSites: true,
        withPayModel: true,
        withPhotos: true,
        withEfiles: true,
        withPayables: false,
        withReadings: true,
      },
    });
  }
  async fetchWeather() {
    if (!this.jobId)
      return;
    this.fireenjinFetch.emit({
      endpoint: "addWeather",
      params: {
        data: {
          jobId: this.jobId,
          zip: this.zip,
        },
      },
    });
  }
  async openReadingSelect(event) {
    this.readingSelectPopoverEl = await popoverController.create({
      component: "popover-reading-select",
      componentProps: {
        readings: this.readings ? Object.values(this.readings) : [],
      },
      event,
    });
    return this.readingSelectPopoverEl.present();
  }
  componentDidLoad() {
    var _a;
    if (!(Build === null || Build === void 0 ? void 0 : Build.isBrowser))
      return;
    this.selectedDay = this.formatDate(new Date());
    if (!((_a = state === null || state === void 0 ? void 0 : state.job) === null || _a === void 0 ? void 0 : _a.id)) {
      this.fetchJob();
    }
    else {
      this.setReadingData();
    }
    this.fetchWeather();
  }
  render() {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
    return [
      h("ion-header", null,
        h("ion-toolbar", null,
          h("ion-buttons", { slot: "start", onClick: (event) => this.openReadingSelect(event) },
            h("ion-button", null,
              h("ion-icon", { slot: "icon-only", name: "caret-down-circle-outline" }))),
          h("ion-title", null, this.dotForm ? "Add Dot" : "Take Readings"),
          h("ion-buttons", { slot: "end" },
            h("ion-button", { onClick: () => this.floodteamCloseModal.emit() },
              h("ion-icon", { slot: "icon-only", name: "close-circle-outline" }))))),
      h("ion-content", null,
        h("ion-card", { style: {
            opacity: this.dotForm ? "1" : "0",
            height: this.dotForm ? "auto" : "0",
          } },
          h("fireenjin-form", { endpoint: "addDot", name: "dot", resetButton: "Cancel", submitButton: "Save", class: "ion-padding", beforeSubmit: (data) => ({
              ...data,
              dryStandard: data.dryStandard ? parseFloat(data.dryStandard) : 0,
              evaporationPotentialGoal: data.evaporationPotentialGoal
                ? parseFloat(data.evaporationPotentialGoal)
                : 0,
              jobId: this.jobId,
            }) },
            h("ion-list", null,
              h("ion-grid", null,
                h("ion-row", null,
                  h("ion-col", null,
                    h("fireenjin-select", { name: "siteId", options: (((_b = (_a = state === null || state === void 0 ? void 0 : state.job) === null || _a === void 0 ? void 0 : _a.sites) === null || _b === void 0 ? void 0 : _b.length)
                        ? state === null || state === void 0 ? void 0 : state.job.sites
                        : []).map((site) => ({
                        label: (site === null || site === void 0 ? void 0 : site.name) || (site === null || site === void 0 ? void 0 : site.id),
                        value: site.id,
                      })), value: this.siteId, label: "Site" }),
                    h("fireenjin-input", { name: "name", labelPosition: "stacked", label: "Name", required: true }),
                    h("fireenjin-input", { labelPosition: "stacked", name: "meter", label: "Meter Used" }),
                    h("fireenjin-input", { labelPosition: "stacked", name: "placement", label: "Placement" }),
                    h("fireenjin-input", { labelPosition: "stacked", name: "material", label: "Material" }))),
                h("ion-row", null,
                  h("ion-col", null,
                    h("fireenjin-input", { labelPosition: "stacked", name: "dryStandard", label: "Dry Standard", type: "number", step: "0.01" })),
                  h("ion-col", null,
                    h("fireenjin-input", { labelPosition: "stacked", name: "evaporationPotentialGoal", label: "EP Goal", type: "number", step: "0.01" }))))))),
        h("fireenjin-form", { style: {
            opacity: this.started || this.dotForm ? "0" : "1",
            height: this.started || this.dotForm ? "0" : "auto",
          }, class: "ion-padding", name: "overview", submitButton: "Start", resetButton: "Cancel", disableLoader: true, beforeSubmit: (data) => {
            this.started = true;
            return data;
          } },
          h("ion-card", { class: "ion-padding" },
            h("ion-list", null, this.steps.map((step, index) => (h("ion-item", null,
              h("ion-icon", { name: step.icon, slot: "start", color: "primary" }),
              h("ion-label", null,
                index + 1,
                ". ",
                step.label))))))),
        h("ion-tabs", { style: {
            opacity: this.started && !this.dotForm ? "1" : "0",
            height: this.started && !this.dotForm ? "auto" : "0",
          }, ref: (el) => (this.tabsEl = el) },
          h("ion-tab-bar", { ref: (el) => (this.tabBarEl = el), slot: "top" }, this.steps.map((step) => (h("ion-tab-button", { tab: step.tab, onClick: () => this.onTabClick(step.tab) },
            h("ion-icon", { name: step.icon }),
            h("ion-label", null, step.name))))),
          h("ion-tab", { tab: "weather" },
            h("ion-content", null,
              h("ion-card", null,
                h("fireenjin-form", { class: "ion-padding", style: {
                    paddingTop: "0",
                  }, name: "weather", endpoint: "addWeather", formData: {
                    jobId: this.jobId,
                    zip: this.zip,
                  }, disableReset: true, disableLoader: true, submitButton: "Next", resetButtonColor: "medium", resetButton: "Back" },
                  h("ion-grid", null,
                    h("ion-row", null,
                      h("ion-col", { size: "12", sizeMd: "7" },
                        h("img", { alt: "Weather Icon", style: {
                            height: "150px",
                            width: "150px",
                            display: "block",
                            margin: "0 auto",
                          }, src: `./assets/images/${((_g = (_f = (_e = (_d = (_c = this.readings) === null || _c === void 0 ? void 0 : _c[this.selectedDay]) === null || _d === void 0 ? void 0 : _d.weather) === null || _e === void 0 ? void 0 : _e.conditions) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.icon)
                            ? "weather/" +
                              this.readings[this.selectedDay].weather
                                .conditions[0].icon
                            : "icon"}.png` }),
                        h("h1", { style: {
                            display: "block",
                            textAlign: "center",
                            margin: "0",
                          } }, ((_l = (_k = (_j = (_h = this.readings) === null || _h === void 0 ? void 0 : _h[this.selectedDay]) === null || _j === void 0 ? void 0 : _j.weather.conditions) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.main) || "No Weather Data..."),
                        h("h3", { style: {
                            display: "block",
                            textAlign: "center",
                            fontSize: "14px",
                            color: "var(--ion-text-color)",
                          } }, ((_o = (_m = this.readings) === null || _m === void 0 ? void 0 : _m[this.selectedDay]) === null || _o === void 0 ? void 0 : _o.name) ||
                          "Enter Zip Code to Search")),
                      h("ion-col", { size: "12", sizeMd: "5", class: "ion-padding" },
                        h("fireenjin-input", { label: "Zip Code", labelPosition: "stacked", placeholder: "Enter a Zip Code", name: "zip", value: this.zip, required: true }),
                        h("fireenjin-input", { label: "Temperature", labelPosition: "stacked", placeholder: "Outside Temp", name: "temperature", value: this.temperature }),
                        h("fireenjin-input", { label: "Humidity", labelPosition: "stacked", placeholder: "Outside Humidity", name: "humidity", value: this.humidity })))))))),
          h("ion-tab", { tab: "atmospheric" },
            h("ion-content", null,
              h("ion-card", null,
                h("fireenjin-form", { disableLoader: true, disableReset: true, name: "atmospheric", submitButton: "Next", resetButtonColor: "medium", resetButton: "Back" },
                  h("ion-list", { class: "ion-no-padding" }, this.getChambers().map((chamber) => [
                    h("ion-item-divider", null,
                      "Chamber ",
                      chamber),
                    h("ion-item", null,
                      h("ion-grid", null,
                        h("ion-row", null,
                          h("ion-col", null,
                            h("fireenjin-input", { label: "Temperature", labelPosition: "stacked", placeholder: "Inside Temp", name: `chamber.${chamber}.temperature` })),
                          h("ion-col", null,
                            h("fireenjin-input", { label: "Humidity", labelPosition: "stacked", placeholder: "Inside Humidity", name: `chamber.${chamber}.humidity` }))))),
                  ])))))),
          h("ion-tab", { tab: "dots" },
            h("ion-content", null,
              h("ion-card", null,
                h("fireenjin-form", { disableLoader: true, disableReset: true, name: "moisture", submitButton: "Next", resetButtonColor: "medium", resetButton: "Back" },
                  h("ion-list", { class: "ion-no-padding" }, (((_p = state === null || state === void 0 ? void 0 : state.job) === null || _p === void 0 ? void 0 : _p.sites) ? state === null || state === void 0 ? void 0 : state.job.sites : []).map((site) => [
                    h("ion-item-divider", null, site === null || site === void 0 ? void 0 :
                      site.name,
                      h("ion-button", { slot: "end", fill: "clear", onClick: () => {
                          this.siteId = site.id;
                          this.dotForm = true;
                        } },
                        "Add Dot",
                        h("ion-icon", { name: "add-circle", slot: "end" }))),
                    ((site === null || site === void 0 ? void 0 : site.dots) ? site.dots : []).map((dot, index) => (h("ion-item", null,
                      h("div", { class: "floodteam-dot", slot: "start" }, (dot === null || dot === void 0 ? void 0 : dot.name) || index + 1),
                      h("ion-grid", { style: { paddingTop: "0" } },
                        h("ion-row", null,
                          h("ion-col", { style: { paddingTop: "0" } },
                            h("fireenjin-input", { label: "Surface Temperature", labelPosition: "stacked", placeholder: "Surface Temp", name: `dot.${dot === null || dot === void 0 ? void 0 : dot.id}.temperature` })),
                          h("ion-col", { style: { paddingTop: "0" } },
                            h("fireenjin-input", { label: "Moisture Content", labelPosition: "stacked", placeholder: "Insert Reading(s)", name: `dot.${dot === null || dot === void 0 ? void 0 : dot.id}.readings` }))))))),
                  ])))))),
          h("ion-tab", { tab: "equipment" },
            h("ion-content", null,
              h("ion-card", null,
                h("fireenjin-form", { disableLoader: true, disableReset: true, name: "equipment", submitButton: "Next", resetButtonColor: "medium", resetButton: "Back" },
                  h("ion-list", { class: "ion-no-padding" }, (((_q = state === null || state === void 0 ? void 0 : state.job) === null || _q === void 0 ? void 0 : _q.sites) || []).map((site) => [
                    h("ion-item-divider", null, site === null || site === void 0 ? void 0 : site.name),
                    ((site === null || site === void 0 ? void 0 : site.equipment) ? site.equipment : []).map((equipment) => {
                      var _a, _b;
                      return (h("ion-item", null,
                        h("div", null,
                          h("ion-label", { class: "ion-padding-top" },
                            h("h2", null, ((_a = equipment === null || equipment === void 0 ? void 0 : equipment.inventory) === null || _a === void 0 ? void 0 : _a.name)
                              ? equipment.inventory.name
                              : (_b = equipment === null || equipment === void 0 ? void 0 : equipment.service) === null || _b === void 0 ? void 0 : _b.name)),
                          h("ion-grid", null,
                            h("ion-row", null,
                              h("ion-col", null,
                                h("fireenjin-input", { label: "Temperature", labelPosition: "stacked", placeholder: "Inlet Temp", name: `equipment.${equipment.id}.inletTemperature` }),
                                h("fireenjin-input", { label: "Humidity", labelPosition: "stacked", placeholder: "Inlet Humidity", name: `equipment.${equipment.id}.inletHumidity` }),
                                h("fireenjin-input", { label: "GPP", labelPosition: "stacked", placeholder: "Inlet Grains Per Pound", name: `equipment.${equipment.id}.inletGrainsPerPound` })),
                              h("ion-col", null,
                                h("fireenjin-input", { label: "Temperature", placeholder: "Outlet Temp", name: `equipment.${equipment.id}.outletTemperature` }),
                                h("fireenjin-input", { label: "Humidity", placeholder: "Outlet Humidity", name: `equipment.${equipment.id}.outletHumidity` }),
                                h("fireenjin-input", { label: "GPP", placeholder: "Outlet Grains Per Pound", name: `equipment.${equipment.id}.outletGrainsPerPound` })))))));
                    }),
                  ])))))))),
    ];
  }
  static get is() { return "modal-take-readings"; }
  static get originalStyleUrls() { return {
    "$": ["modal-take-readings.css"]
  }; }
  static get styleUrls() { return {
    "$": ["modal-take-readings.css"]
  }; }
  static get properties() { return {
    "jobId": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "job-id",
      "reflect": false
    },
    "siteId": {
      "type": "string",
      "mutable": true,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "site-id",
      "reflect": false
    },
    "zip": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "zip",
      "reflect": false
    },
    "dotForm": {
      "type": "boolean",
      "mutable": true,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "dot-form",
      "reflect": false,
      "defaultValue": "false"
    },
    "closeOnFinish": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "close-on-finish",
      "reflect": false,
      "defaultValue": "false"
    },
    "job": {
      "type": "unknown",
      "mutable": true,
      "complexType": {
        "original": "Job",
        "resolved": "{ __typename?: \"Job\"; address?: Address; afterhours?: boolean; amountBilled?: number; amountDeducted?: number; amountOwed?: number; amountPaid?: number; appointment?: Appointment; appointments?: Appointment[]; attributionToken?: Token; category?: number; cause?: string; claimNumber?: string; createdAt?: string; createdBy?: User; customer?: User; dateOfLoss?: string; efileCount?: number; efiles?: Efile[]; feed?: Feed[]; id?: string; invoices?: Invoice[]; isFranchise?: boolean; isInsured?: boolean; isSearchable?: boolean; location?: Location; manager?: User; matterportModelId?: string; payModel?: PayModel; payables?: Payable[]; payments?: Payment[]; phone?: string; photos?: Photo[]; picture?: string; propertyAge?: number; ratings?: Rating[]; readings?: Reading[]; referral?: User; services?: ScopeService[]; sites?: Site[]; status?: string; tags?: string[]; title?: string; type?: string; updatedAt?: string; updatedBy?: User; userIds?: string[]; users?: User[]; weather?: Weather[]; weatherIds?: string[]; }",
        "references": {
          "Job": {
            "location": "import",
            "path": "../../../sdk"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
  static get states() { return {
    "started": {},
    "completed": {},
    "temperature": {},
    "humidity": {},
    "readings": {},
    "selectedDay": {},
    "actionQueue": {},
    "dotSiteMap": {},
    "equipmentSiteMap": {}
  }; }
  static get events() { return [{
      "method": "fireenjinFetch",
      "name": "fireenjinFetch",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }, {
      "method": "floodteamCloseModal",
      "name": "floodteamCloseModal",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
  static get listeners() { return [{
      "name": "fireenjinSubmit",
      "method": "onSubmit",
      "target": undefined,
      "capture": false,
      "passive": false
    }, {
      "name": "fireenjinSuccess",
      "method": "onSuccess",
      "target": "body",
      "capture": false,
      "passive": false
    }, {
      "name": "fireenjinReset",
      "method": "onReset",
      "target": "body",
      "capture": false,
      "passive": false
    }]; }
}
//# sourceMappingURL=modal-take-readings.js.map