import{r as o,B as i,h as l}from"./p-9b6cc562.js";import{t as d}from"./p-a4d32aeb.js";import{s as n}from"./p-889c70e7.js";import"./p-24c4a299.js";import"./p-8cd54418.js";import"./p-e5527167.js";import"./p-95e9f2f6.js";import"./p-86bd3473.js";import"./p-65879f9e.js";import"./p-60cf0cc2.js";const t=class{constructor(i){o(this,i),this.referring=!1,this.isAgent=!1,this.locationId=void 0,this.agentId=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,e,v,s,a,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===(e=null==n?void 0:n.profile)||void 0===e?void 0:e.firstName)||""} ${(null===(v=null==n?void 0:n.profile)||void 0===v?void 0:v.lastName)||""}`,company:(null===(a=null===(s=null==n?void 0:n.profile)||void 0===s?void 0:s.company)||void 0===a?void 0:a.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,t;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",{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===(t=null==n?void 0:n.claims)||void 0===t?void 0:t.locationId)}))),l("floodteam-navigation-footer",null)]}};t.style="";export{t as app_job_new}