import{r as o,B as i,h as n}from"./p-03169580.js";import{s as e}from"./p-29293869.js";import{g as l}from"./p-e2c3460e.js";import{t as d}from"./p-c5cf028c.js";import"./p-59c95c5f.js";import"./p-1930048e.js";import"./p-4cb16df5.js";import"./p-7cbdb4ea.js";const t="";let r=class{constructor(i){o(this,i);this.referring=false}async onSuccess(o){if(o.detail.name==="recommendation"){this.to=null;this.name=null;(await d.create({message:`Successfully sent recommendation(s).`,duration:3e3})).present()}}onBeforeSubmit(o){var i,n,l,d,t,r,a,s,u,m,v,c;return{templateId:"BaGYHYB6q7UBmgvoPATx",from:"info@thefloodteam.com",emails:((n=(i=o===null||o===void 0?void 0:o.to)===null||i===void 0?void 0:i.split)===null||n===void 0?void 0:n.call(i,","))||[],data:{firstName:(o===null||o===void 0?void 0:o.name)||"there",url:`${e.config.url}?referredBy=${(l=e.profile)===null||l===void 0?void 0:l.id}`,partner:{id:(d=e===null||e===void 0?void 0:e.session)===null||d===void 0?void 0:d.uid,name:`${((t=e===null||e===void 0?void 0:e.profile)===null||t===void 0?void 0:t.firstName)||""} ${((r=e===null||e===void 0?void 0:e.profile)===null||r===void 0?void 0:r.lastName)||""}`,company:((s=(a=e===null||e===void 0?void 0:e.profile)===null||a===void 0?void 0:a.company)===null||s===void 0?void 0:s.name)||"The Flood Team",title:((u=e===null||e===void 0?void 0:e.profile)===null||u===void 0?void 0:u.type)||"Mitigation Specialist",phone:(m=e===null||e===void 0?void 0:e.profile)===null||m===void 0?void 0:m.phone,location:(c=(v=e===null||e===void 0?void 0:e.profile)===null||v===void 0?void 0:v.location)===null||c===void 0?void 0:c.name}}}}componentDidLoad(){if(!(i===null||i===void 0?void 0:i.isBrowser))return}render(){var o;return[n("ion-content",{class:"ion-padding"},n("floodteam-title-bar",null,n("ion-router-link",{href:"/jobs"},"Jobs")),n("ion-grid",null,n("ion-row",null,n("ion-col",{size:"12",sizeMd:"6"},n("h1",{class:"title"},this.referring?"Refer A Flood":"Add Job"),n("floodteam-book-now",{referring:this.referring,referralId:(o=e===null||e===void 0?void 0:e.session)===null||o===void 0?void 0:o.uid,token:l("token"),locationId:l("location")})),n("ion-col",{size:"12",sizeMd:"6"},n("h1",{class:"title"},"Recommend Us"),n("ion-card",null,n("ion-card-content",{class:"ion-padding"},n("p",null,"Enter the email or phone of the person you would like to recommend The Flood Team water damage restoration services to and we will send them an email detailing how we can help."),n("br",null),n("fireenjin-form",{hideControls:true,name:"recommendation",endpoint:"sendTemplateEmail",disableEnterButton:true,beforeSubmit:this.onBeforeSubmit.bind(this)},n("ion-grid",null,n("ion-row",null,n("ion-col",null,n("fireenjin-input",{name:"name",placeholder:"Customer's Name",value:this.name}),n("fireenjin-input",{name:"to",placeholder:"Customer's Email",value:this.to}))),n("ion-row",null,n("ion-col",null,n("ion-button",{size:"default",expand:"block",type:"submit"},"Send",n("ion-icon",{name:"send",slot:"end"})))))))))))),n("floodteam-navigation-footer",null)]}};r.style=t;export{r as app_job_new};
//# sourceMappingURL=p-77676408.entry.js.map