import{r as o,B as i,h as l}from"./p-846bd001.js";import{t as d}from"./p-9732f456.js";import{s as n}from"./p-4ff8bb4b.js";import{g as t}from"./p-e2c3460e.js";import"./p-18891da7.js";import"./p-8cd54418.js";import"./p-5cd01495.js";import"./p-259f1737.js";import"./p-ae2fb9dc.js";import"./p-65879f9e.js";import"./p-dca1478c.js";const a=class{constructor(i){o(this,i),this.referring=!1,this.isAgent=!1,this.locationId=void 0,this.agentId=void 0,this.campaignId=void 0,this.to=void 0,this.name=void 0}async onSuccess(o){"recommendation"===o.detail.name&&(this.to=null,this.name=null,(await d.create({message:"Successfully sent recommendation(s).",duration:3e3})).present())}onBeforeSubmit(o){var i,l,d,t,a,e,s,v,r,u,m,p;return{templateId:"BaGYHYB6q7UBmgvoPATx",from:"info@thefloodteam.com",emails:(null===(l=null===(i=null==o?void 0:o.to)||void 0===i?void 0:i.split)||void 0===l?void 0:l.call(i,","))||[],data:{firstName:(null==o?void 0:o.name)||"there",url:`${n.config.url}?referredBy=${null===(d=n.profile)||void 0===d?void 0:d.id}`,partner:{id:null===(t=null==n?void 0:n.session)||void 0===t?void 0:t.uid,name:`${(null===(a=null==n?void 0:n.profile)||void 0===a?void 0:a.firstName)||""} ${(null===(e=null==n?void 0:n.profile)||void 0===e?void 0:e.lastName)||""}`,company:(null===(v=null===(s=null==n?void 0:n.profile)||void 0===s?void 0:s.company)||void 0===v?void 0:v.name)||"The Flood Team",title:(null===(r=null==n?void 0:n.profile)||void 0===r?void 0:r.type)||"Mitigation Specialist",phone:null===(u=null==n?void 0:n.profile)||void 0===u?void 0:u.phone,location:null===(p=null===(m=null==n?void 0:n.profile)||void 0===m?void 0:m.location)||void 0===p?void 0:p.name}}}}componentDidLoad(){}render(){var o,i,d,a;return[l("ion-content",{class:"ion-padding"},l("floodteam-title-bar",null,l("ion-router-link",{href:"/jobs"},"Jobs")),l("ion-card",{style:{width:"90%",maxWidth:"800px",margin:"10% auto"}},l("floodteam-book-flow",{campaignId:this.campaignId||t("campaign")||null,agentId:this.isAgent&&this.agentId||null,referralId:this.referring&&(null===(o=null==n?void 0:n.session)||void 0===o?void 0:o.uid)||null,googleMapsKey:null===(d=null===(i=null==n?void 0:n.config)||void 0===i?void 0:i.firebase)||void 0===d?void 0:d.apiKey,locationId:this.locationId||(null===(a=null==n?void 0:n.claims)||void 0===a?void 0:a.locationId)}))),l("floodteam-navigation-footer",null)]}};a.style="";export{a as app_job_new}