import{r as i,d as o,h as d}from"./p-03169580.js";import{s as l}from"./p-02c5cd3a.js";import"./p-59c95c5f.js";import"./p-c9699503.js";import"./p-80de33dc.js";import"./p-c2fbed0d.js";import"./p-3a8e6af1.js";const t="";let n=class{constructor(d){i(this,d);this.fireenjinFetch=o(this,"fireenjinFetch",7);this.user={}}async onSuccess(i){var o,d,l,t,n;if(i.detail.endpoint==="findJob"&&((l=(d=(o=i===null||i===void 0?void 0:i.detail)===null||o===void 0?void 0:o.data)===null||d===void 0?void 0:d.job)===null||l===void 0?void 0:l.id)===this.jobId){this.job=(n=(t=i===null||i===void 0?void 0:i.detail)===null||t===void 0?void 0:t.data)===null||n===void 0?void 0:n.job}}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(!this.job&&this.jobId)this.fetchJob()}render(){var i,o,t,n,s,v,e,u,r,a,h,p,c,f,m,y,j;return[d("ion-content",{class:"ion-padding"},d("floodteam-title-bar",{back:`/jobs/${this.jobId}`,icon:"logo-usd"},d("ion-router-link",{href:"/payments"},"Payments")),d("floodteam-epay",{jobId:this.jobId,stripeKey:((i=this.job)===null||i===void 0?void 0:i.isFranchise)&&((n=(t=(o=l.config)===null||o===void 0?void 0:o.franchise)===null||t===void 0?void 0:t.stripe)===null||n===void 0?void 0:n.key)?l.config.franchise.stripe.key:(v=(s=l.config)===null||s===void 0?void 0:s.stripe)===null||v===void 0?void 0:v.key,dadeKey:this.job.isFranchise&&((r=(u=(e=l.config)===null||e===void 0?void 0:e.franchise)===null||u===void 0?void 0:u.dade)===null||r===void 0?void 0:r.apiKey)?l.config.franchise.dade.apiKey:(h=(a=l.config)===null||a===void 0?void 0:a.dade)===null||h===void 0?void 0:h.apiKey,dadeUrl:this.job.isFranchise&&((f=(c=(p=l.config)===null||p===void 0?void 0:p.franchise)===null||c===void 0?void 0:c.dade)===null||f===void 0?void 0:f.url)?l.config.franchise.dade.url:(y=(m=l.config)===null||m===void 0?void 0:m.dade)===null||y===void 0?void 0:y.url,userId:(j=l===null||l===void 0?void 0:l.session)===null||j===void 0?void 0:j.uid})),d("floodteam-navigation-footer",null)]}};n.style=t;export{n as app_pay};
//# sourceMappingURL=p-10a13be1.entry.js.map