1import{j as e,d as n}from"./main-Culg7Cil.js";import{S as l}from"./simpleLoading-C-KM2mbv.js";import{R as o}from"./reCaptchaLegal-BpcLTbVh.js";import{D as i}from"./luxon-BDx6lZXm.js";import{u as c,o as d,s as r}from"./appForm-Djg-yYeH.js";import"./label-MYpEiHCa.js";import"./checkbox-Bxiyz9xL.js";import"./check-DiqebWa-.js";import"./useRenderElement-B6BBoDQC.js";import"./stateAttributesMapping-CSxCs_dV.js";const x=d({new_customer_first_name:r().max(30).min(2,{message:"Please enter 2 or more characters"}),new_customer_last_name:r().max(30).min(2,{message:"Please enter 2 or more characters"}),new_customer_company_name:r().max(100).min(2,{message:"Please enter 2 or more characters"}),new_customer_email:r().email({message:"Please enter a valid email"}).min(1),new_customer_phone_number:r().regex(/^\(?([0-9]{3})\)?[-.â]?([0-9]{3})[-.â]?([0-9]{4})$/,{message:"Please enter a valid phone number"}),full_name:r().max(30).min(2,{message:"Please enter 2 or more characters"}),email:r().email({message:"Please enter a valid email"}).min(1),leadsource:r(),referralDate:r()});function u(){const t={new_customer_first_name:"",new_customer_last_name:"",new_customer_company_name:"",new_customer_email:"",full_name:"",email:"",new_customer_phone_number:"",leadsource:"Website-refer-
1a-friend",referralDate:i.now().toISO()??""},s=c({defaultValues:t,validators:{onChange:x},onSubmit:async({value:a})=>{const m={FirstName:a.new_customer_first_name,LastName:a.new_customer_last_name,Company:a.new_customer_company_name,Email:a.new_customer_email,Phone:a.new_customer_phone_number,LeadSource:a.leadsource,Referrer_Name__c:a.full_name,Referrer_Email__c:a.email,Referral_Date__c:a.referralDate};console.log("[ReferAFriendForm] submit",m)}});return e.jsx("form",{onSubmit:a=>{a.preventDefault(),s.handleSubmit()},className:"flex w-auto justify-center pb-24",children:e.jsxs("div",{className:"flex flex-col max-w-prose gap-4 p-8 mx-4 md:mx-0 bg-surface rounded-md",children:[e.jsx("div",{className:"font-sans text-4xl font-bold text-center text-titletextdark",children:"Get an $150 benefit for both you & your friend now"}),e.jsx("h2",{className:"text-xl font-semibold font-sans",children:"Your Friend"}),e.jsx(s.AppField,{name:"new_customer_first_name",children:a=>e.jsx(a.TextField,{label:"New Customer's First Name*",placeholder:"New customer's first name"})}),e.jsx(s.AppField,{name:"new_customer_last_name",children:a=>e.jsx(a.TextField,{label:"New Customer's Last Name*",placeholder:"New customer's last name"})}),e.jsx(s.AppField,{name:"new_customer_company_name",children:a=>e.jsx(a.TextField,{label:"New Customer's Company Name",placeholder:"New customer's company name"})}),e.jsx(s.AppField,{name:"new_customer_email",children:a=>e.jsx(a.TextField,{label:"New Customer's Email Address*",placeholder:"New customer's email",type:"email",autoComplete:"email"})}),e.jsx(s.AppField,{name:"new_customer_phone_number",children:a=>e.jsx(a.TextField,{label:"New Customer's Phone Number*",placeholder:"New customer's phone number",autoComplete:"tel"})}),e.jsx("h2",{className:"text-xl font-semibold font-sans mt-4",children:"You (Existing Customer)"}),e.jsx(s.AppField,{name:"full_name",children:a=>e.jsx(a.TextField,{label:"Your Full Name*",placeholder:"Your name (existing customer)"})}),e.jsx(s.AppField,{name:"email",children:a=>e.jsx(a.TextField,{label:"Email Address",placeholder:"Your email"})}),e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(s.AppForm,{children:e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(s.SubmitButton,{disabled:!1,className:n(["flex flex-row justify-center items-center gap-2 font-sans text-xl font-normal text-center rounded-lg py-2 px-4 text-white",{"bg-primary hover:bg-blue-500 ":s.state.isValid&&!s.state.isSubmitting},{"bg-gray-400":!s.state.isValid||s.state.isSubmitting}]),children:"Refer-a-Friend"}),s.state.isSubmitting?e.jsx(l,{}):null]})}),e.jsx(o,{})]})]})})}function P(){return e.jsxs("div",{className:"w-full",children:[e.jsx("section",{className:"pt-32 pb-16 gradient-subtle",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsx("p",{className:"text-primary font-semibold mb-3 uppercase tracking-wide text-sm",children:"Referral Program"}),e.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold text-foreground mb-4",children:"Share Soundry. Get rewarded."}),e.jsx("p",{className:"text-muted-foreground text-lg",children:"Refer a colleague and we'll take care of the rest."})]})})}),e.jsx("section",{className:"py-16 bg-background",children:e.jsx("div",{className:"container mx-auto px-4 max-w-3xl",children:e.jsx(u,{})})})]})}export{P as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.