import{r as o,B as e,h as a}from"./p-03169580.js";import{t as i}from"./p-3bc4f2ce.js";import{g as n}from"./p-c9699503.js";import{c as r}from"./p-c1f0a459.js";import"./p-4cb16df5.js";import"./p-f44f0a67.js";import"./p-de14d315.js";import"./p-80de33dc.js";const t="modal-onboarding .banner{background-color:var(--ion-color-secondary)}modal-onboarding ion-content{--background:var(--ion-color-base) !important}modal-onboarding h1{color:#fff}modal-onboarding p{margin:0 0 15px 0;color:rgba(255, 255, 255, 0.8);font-weight:normal}.modal-onboarding{--width:700px;--max-width:700px}@media only screen and (max-width: 800px){.modal-onboarding{--width:100%;--max-width:auto}}";let l=class{constructor(e){o(this,e);this.user={}}async onReset(o){if(o.detail.endpoint==="editUser"){await r("referredBy");const o=document.querySelector("ion-modal.modal-onboarding");if(o===null||o===void 0?void 0:o.dismiss){await o.dismiss()}}}async onSuccess(o){var e;if(((e=o.detail)===null||e===void 0?void 0:e.endpoint)==="editUser"){await r("referredBy");const o=document.querySelector("ion-modal.modal-onboarding");if(o===null||o===void 0?void 0:o.dismiss){await o.dismiss();this.presentToast()}}}async presentToast(){const o=await i.create({message:`Your profile has been setup successfully!`,duration:3e3});o.present()}async componentDidLoad(){if(!(e===null||e===void 0?void 0:e.isBrowser))return;this.referralId=await n("referredBy",null)}render(){var o,e,i,n;return a("ion-content",null,a("div",{class:"banner ion-padding"},a("h1",null,"Finish your Profile"),a("p",null,"Complete the fields below to finish setting up your profile.")),a("fireenjin-form",{class:"ion-padding",name:"onboarding",endpoint:"editUser",documentId:(o=this.user)===null||o===void 0?void 0:o.id,formData:{firstName:(e=this.user)===null||e===void 0?void 0:e.firstName,lastName:(i=this.user)===null||i===void 0?void 0:i.lastName,isOnboarded:true,referralId:this.referralId},resetButton:"Later",resetButtonColor:"medium"},a("fireenjin-input",{label:"First Name",labelPosition:"stacked",placeholder:"What is your first name?",name:"firstName",value:this.user.firstName}),a("fireenjin-input",{label:"Last Name",labelPosition:"stacked",placeholder:"What is your last name?",name:"lastName",value:this.user.lastName}),a("fireenjin-radios",{name:"type",label:"Type",labelPosition:"stacked",options:[{label:"Referral Partner",value:"referral"},{label:"Property Owner / Manager",value:"property"},{label:"Claims Representaive",value:"insurance"}],value:(n=this.user)===null||n===void 0?void 0:n.type})))}};l.style=t;export{l as modal_onboarding};
//# sourceMappingURL=p-027b858d.entry.js.map