import{r as o,B as i,h as l}from"./p-a89095f5.js";import{t as n}from"./p-3e7f0e42.js";import{s as d}from"./p-188ef7e9.js";import{g as t}from"./p-e2c3460e.js";import"./p-29ec504c.js";import"./p-8cd54418.js";import"./p-d7f93824.js";import"./p-2a0c7fc9.js";import"./p-86bd3473.js";import"./p-65879f9e.js";import"./p-60cf0cc2.js";const e=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 n.create({message:"Successfully sent recommendation(s).",duration:3e3})).present())}onBeforeSubmit(o){var i,l,n,t,e,s,a,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:`${d.config.url}?referredBy=${null===(n=d.profile)||void 0===n?void 0:n.id}`,partner:{id:null===(t=null==d?void 0:d.session)||void 0===t?void 0:t.uid,name:`${(null===(e=null==d?void 0:d.profile)||void 0===e?void 0:e.firstName)||""} ${(null===(s=null==d?void 0:d.profile)||void 0===s?void 0:s.lastName)||""}`,company:(null===(v=null===(a=null==d?void 0:d.profile)||void 0===a?void 0:a.company)||void 0===v?void 0:v.name)||"The Flood Team",title:(null===(r=null==d?void 0:d.profile)||void 0===r?void 0:r.type)||"Mitigation Specialist",phone:null===(u=null==d?void 0:d.profile)||void 0===u?void 0:u.phone,location:null===(p=null===(m=null==d?void 0:d.profile)||void 0===m?void 0:m.location)||void 0===p?void 0:p.name}}}}componentDidLoad(){(null==i?void 0:i.isBrowser)&&console.log(this.locationId)}render(){var o,i,n,e;const s=this.locationId||t("location")||(null===(o=null==d?void 0:d.claims)||void 0===o?void 0:o.locationId);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===(i=null==d?void 0:d.session)||void 0===i?void 0:i.uid)||null,googleMapsKey:null===(e=null===(n=null==d?void 0:d.config)||void 0===n?void 0:n.firebase)||void 0===e?void 0:e.apiKey,locationId:s}))),l("floodteam-navigation-footer",null)]}};e.style="";export{e as app_job_new}