'use strict';

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

const index = require('./index-ee190ee0.js');
const store = require('./store-27073b3b.js');
require('./index-4901314f.js');
require('./getHandlebarsHelpers-8ef28401.js');
require('./_commonjsHelpers-a5111d61.js');
require('./index-ba857994.js');
require('./localforage-af1b8c0e.js');

const appPayCss = "";

const AppPay = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.fireenjinFetch = index.createEvent(this, "fireenjinFetch", 7);
    this.jobId = undefined;
  }
  async fetchJob() {
    if (!this.jobId)
      return;
    this.fireenjinFetch.emit({
      endpoint: "findJob",
      params: {
        id: this.jobId,
        withPayments: true,
        withUsers: true,
        withSites: true,
        withPayModel: true,
        withPhotos: true,
        withEfiles: true,
        withPayables: false,
        withReadings: true,
      },
    });
  }
  componentDidLoad() {
    if (!(store.state === null || store.state === void 0 ? void 0 : store.state.job) && this.jobId)
      this.fetchJob();
  }
  render() {
    return [
      index.h("ion-content", { class: "ion-padding", style: { position: "relative" } }, index.h("floodteam-title-bar", { back: `/jobs/${this.jobId}`, icon: "logo-usd" }, index.h("ion-router-link", { href: "/payments" }, "Make a Payment")), index.h("ion-card", { style: {
          width: "90%",
          maxWidth: "800px",
          margin: "10% auto",
        } }, index.h("floodteam-payment-flow", { jobId: this.jobId }))),
      index.h("floodteam-navigation-footer", null),
    ];
  }
};
AppPay.style = appPayCss;

exports.app_pay = AppPay;
