import{r as o,B as a,h as e}from"./p-846bd001.js";import{t as i}from"./p-9732f456.js";import{g as n}from"./p-80483281.js";import{c as r}from"./p-faa45619.js";import"./p-18891da7.js";import"./p-8cd54418.js";import"./p-dca1478c.js";import"./p-ae2fb9dc.js";const t=class{constructor(a){o(this,a),this.user={},this.referralId=void 0}async onReset(o){if("editUser"===o.detail.endpoint){await r("referredBy");const o=document.querySelector("ion-modal.modal-onboarding");(null==o?void 0:o.dismiss)&&await o.dismiss()}}async onSuccess(o){var a;if("editUser"===(null===(a=o.detail)||void 0===a?void 0:a.endpoint)){await r("referredBy");const o=document.querySelector("ion-modal.modal-onboarding");(null==o?void 0:o.dismiss)&&(await o.dismiss(),this.presentToast())}}async presentToast(){(await i.create({message:"Your profile has been setup successfully!",duration:3e3})).present()}async componentDidLoad(){(null==a?void 0:a.isBrowser)&&(this.referralId=await n("referredBy",null))}render(){var o,a,i,n;return e("ion-content",null,e("div",{class:"banner ion-padding"},e("h1",null,"Finish your Profile"),e("p",null,"Complete the fields below to finish setting up your profile.")),e("fireenjin-form",{class:"ion-padding",name:"onboarding",endpoint:"editUser",documentId:null===(o=this.user)||void 0===o?void 0:o.id,formData:{firstName:null===(a=this.user)||void 0===a?void 0:a.firstName,lastName:null===(i=this.user)||void 0===i?void 0:i.lastName,isOnboarded:!0,referralId:this.referralId},resetButton:"Later",resetButtonColor:"medium"},e("fireenjin-input",{label:"First Name",labelPosition:"stacked",placeholder:"What is your first name?",name:"firstName",value:this.user.firstName}),e("fireenjin-input",{label:"Last Name",labelPosition:"stacked",placeholder:"What is your last name?",name:"lastName",value:this.user.lastName}),e("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:null===(n=this.user)||void 0===n?void 0:n.type})))}};t.style="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}}";export{t as modal_onboarding}