1import{r as e,j as s,n as t}from"./vendor-DKpN-gn6.js";import{u as a,B as r}from"./index-CjqWG2Gu.js";import{I as i}from"./input-BczSeZo5.js";import{u as l,F as n,a as o,b as m,c,d,e as x,t as h}from"./form-gUyvjEUn.js";import{z as u}from"./index-Cpv5ucUd.js";import{m as j}from"./mailchimpService-BSr-9f18.js";import"./auth-D0Oxv0aP.js";import"./ui-DbiJ6HOd.js";import"./label-D75N5ztj.js";const f=u.object({firstName:u.string().min(1,"First name is required"),lastName:u.string().min(1,"Last name is required"),email:u.string().email("Invalid email address")}),p=()=>{const[p,g]=e.useState(!1),{toast:N}=a(),b=l({resolver:h(f),defaultValues:{firstName:"",lastName:"",email:""}});return s.jsx("section",{className:"w-full bg-gradient-to-r from-brand-orange to-brand-yellow py-16 px-4 md:py-20",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center text-white",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"bg-white/20 rounded-full p-4",children:s.jsx(t,{className:"h-8 w-8 text-white"})})}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Join the BrandJitsu Community"}),s.jsx("p",{className:"text-lg mb-10",children:"Get exclusive access to branding tips, worksheets, and updates."}),s.jsx(n,{...b,children:s.jsxs("form",{onSubmit:b.handleSubmit((async e=>{g(!0);try{await j.subscribe({firstName:e.firstName,lastName:e.lastName,email:e.email,tags:["Community Join"]}),N({title:"Success!",description:"You've successfully joined the BrandJitsu community!",variant:"default"}),b.reset()}catch(s){if(s instanceof u.ZodError){const e=s.errors.map((e=>e.message)).join(", ");N({title:"Form validation error",description:e,variant:"destructive"})}else N({title:"Something went wrong",description:"There was an error submitting your information. Please try again later.",variant:"destructive"})}finally{g(!1)}})),className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[s.jsx(o,{control:b.control,name:"firstName",render:({field:e})=>s.jsxs(m,{children:[s.jsx(c,{className:"sr-only",children:"First Name"}),s.jsx(d,{children:s.jsx(i,{placeholder:"First Name",autoComplete:"given-name",className:"bg-white/95 border-none text-gray-900 placeholder:text-gray-500 focus:ring-white",...e})}),s.jsx(x,{className:"text-white text-left"})]})}),s.jsx(o,{control:b.control,name:"lastName",render:({field:e})=>s.jsxs(m,{children:[s.jsx(c,{className:"sr-only",children:"Last Name"}),s.jsx(d,{children:s.jsx(i,{placeholder:"Last Name",autoComplete:"family-name",className:"bg-white/95 border-none text-gray-900 placeholder:text-gray-500 focus:ring-white",...e})}),s.jsx(x,{className:"text-white text-left"})]})})]}),s.jsx(o,{control:b.control,name:"email",render:({field:e})=>s.jsxs(m,{children:[s.jsx(c,{className:"sr-only",children:"Email address"}),s.jsx(d,{children:s.jsx(i,{placeholder:"Enter your email",type:"email",autoComplete:"email",className:"bg-white/95 border-none text-gray-900 placeholder:text-gray-500 focus:ring-white",...e})}),s.jsx(x,{className:"text-white text-left"})]})}),s.jsx(r,{type:"submit",className:"w-full bg-white text-brand-orange hover:bg-white/90 font-medium py-2 px-4 rounded transition-colors duration-300 mt-4",disabled:p,children:p?"Subscribing...":"Subscribe Now"})]})})]})})};export{p as default};
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.