1import{a as l,j as e}from"./vendor-framer-Bi1qEhT1.js";import{A as f}from"./index-Do3puBAy.js";import"./vendor-tiptap-DCrKpgXq.js";import"./vendor-gsap-C0eCJjti.js";const w=({onHomeClick:x})=>{const[t,d]=l.useState({business_name:"",full_name:"",phone_number:"",city:"",email:""}),[r,m]=l.useState(!1),[p,u]=l.useState(!1),[c,n]=l.useState(null),s=o=>{const{name:a,value:i}=o.target;d(h=>({...h,[a]:i}))},b=async o=>{o.preventDefault(),m(!0),n(null);try{const a=await fetch(`${f}/api/distributor-applications/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(a.ok)u(!0),d({business_name:"",full_name:"",phone_number:"",city:"",email:""});else{const i=await a.json();n(i.message||"Failed to submit application. Please try again.")}}catch{n("An error occurred. Please check your connection and try again.")}finally{m(!1)}};return p?e.jsx("div",{className:"bg-background-light min-h-screen pt-10 pb-20 flex items-center justify-center px-4",children:e.jsxs("div",{className:"max-w-md w-full bg-white border-2 border-slate-900 rounded-3xl p-10 text-center shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] animate-in zoom-in-95 duration-300",children:[e.jsx("div",{className:"w-20 h-20 bg-green-100 text-green-600 rounded-full flex items-center justify-center mx-auto mb-6 border-2 border-slate-900 shadow-sm",children:e.jsx("span",{className:"material-symbols-outlined text-4xl",children:"check_circle"})}),e.jsx("h2",{className:"text-4xl md:text-5xl font-bold uppercase text-slate-900 mb-4 font-anton",children:"Application Received!"}),e.jsx("p",{className:"text-slate-600 font-medium mb-8 leading-relaxed",children:"Thank you for your interest in partnering with Pinobite. Our team will review your details and get back to you within 2-3 business days."}),e.jsx("button",{onClick:x,className:"w-full bg-primary text-white py-4 rounded-xl font-black uppercase tracking-widest hover:shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] hover:-translate-y-1 transition-all active:translate-y-0 active:shadow-none",children:"Back to Home"})]})}):e.jsxs("div",{className:"bg-background-light min-h-screen pt-10 pb-20 relative overflow-hidden",children:[e.jsxs("div",{className:"absolute top-0 left-0 w-full h-full overflow-hidden pointer-events-none opacity-[0.03] z-0 hidden md:block",children:[e.jsx("div",{className:"font-anton text-9xl absolute top-20 right-10 rotate-12",children:"PARTNER"}),e.jsx("div",{className:"font-anton text-9xl absolute top-1/2 left-20 -rotate-12",children:"DISTRIBUTE"}),e.jsx("div",{className:"font-anton text-9xl absolute bottom-20 right-1/3 rotate-45",children:"GROW"})]}),e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 relative z-10",children:[e.jsxs("div",{className:"text-center mb-10 md:mb-16 relative",children:[e.jsx("h1",{className:"font-bold uppercase text-slate-900 tracking-normal leading-[0.9] mb-4 font-anton",style:{fontSize:"clamp(2.4rem, 10vw, 6rem)"},children:e.jsxs("span",{className:"flex flex-wrap items-center justify-center gap-x-3 gap-y-1",children:[e.jsx("span",{children:"Join the"}),e.jsx("img",{src:"/logos/Pinobite-logo.png",alt:"Pinobite Logo",className:"inline-block w-auto relative",style:{height:"clamp(2rem, 8vw, 5rem)",verticalAlign:"middle",marginTop:"-0.1em"}}),e.jsx("span",{children:"Family"})]})}),e.jsx("p",{className:"text-base md:text-lg text-slate-600 font-medium max-w-2xl mx-auto leading-relaxed px-2",children:"We're looking for passionate partners to help us bring premium, healthy snacks to every household. Fill out the form below to start your journey with us."})]}),e.jsxs("div",{className:"bg-white border-2 border-slate-900 rounded-[1.5rem] md:rounded-[2.5rem] p-6 sm:p-8 md:p-12 shadow-[8px_8px_0px_0px_rgba(0,138,69,0.1)] relative",children:[e.jsx("div",{className:"absolute -top-5 right-4 md:-top-6 md:-right-10 transform rotate-6 border-2 border-slate-900 px-3 py-1.5 rounded bg-yellow-400 shadow-sm hidden sm:block",children:e.jsx("div",{className:"flex items-center gap-1 text-slate-900 font-black text-xs uppercase tracking-widest",children:"Distributor Application"})}),e.jsxs("form",{onSubmit:b,className:"space-y-6 md:space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5 md:gap-8",children:[e.jsxs("div",{className:"space-y-2 md:space-y-3",children:[e.jsxs("label",{className:"text-xs font-black uppercase tracking-widest text-slate-500 ml-1 flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"business"}
1),"Your Business Name ",e.jsx("span",{className:"text-red-500 font-bold",children:"*"})]}),e.jsx("input",{required:!0,type:"text",name:"business_name",value:t.business_name,onChange:s,placeholder:"Enter your business name",className:"w-full px-4 md:px-6 py-3 md:py-4 rounded-xl md:rounded-2xl border-2 border-slate-200 focus:border-primary focus:ring-0 outline-none font-bold text-slate-700 transition-all bg-slate-50/50 placeholder:text-slate-300 placeholder:font-normal text-sm md:text-base"})]}),e.jsxs("div",{className:"space-y-2 md:space-y-3",children:[e.jsxs("label",{className:"text-xs font-black uppercase tracking-widest text-slate-500 ml-1 flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"person"}),"Your Full Name ",e.jsx("span",{className:"text-red-500 font-bold",children:"*"})]}),e.jsx("input",{required:!0,type:"text",name:"full_name",value:t.full_name,onChange:s,placeholder:"Enter your full name",className:"w-full px-4 md:px-6 py-3 md:py-4 rounded-xl md:rounded-2xl border-2 border-slate-200 focus:border-primary focus:ring-0 outline-none font-bold text-slate-700 transition-all bg-slate-50/50 placeholder:text-slate-300 placeholder:font-normal text-sm md:text-base"})]}),e.jsxs("div",{className:"space-y-2 md:space-y-3",children:[e.jsxs("label",{className:"text-xs font-black uppercase tracking-widest text-slate-500 ml-1 flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"call"}),"Phone Number ",e.jsx("span",{className:"text-red-500 font-bold",children:"*"})]}),e.jsx("input",{required:!0,type:"tel",name:"phone_number",value:t.phone_number,onChange:s,placeholder:"Enter phone number",className:"w-full px-4 md:px-6 py-3 md:py-4 rounded-xl md:rounded-2xl border-2 border-slate-200 focus:border-primary focus:ring-0 outline-none font-bold text-slate-700 transition-all bg-slate-50/50 placeholder:text-slate-300 placeholder:font-normal text-sm md:text-base"})]}),e.jsxs("div",{className:"space-y-2 md:space-y-3",children:[e.jsxs("label",{className:"text-xs font-black uppercase tracking-widest text-slate-500 ml-1 flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"location_city"}),"Your City Name"]}),e.jsx("input",{type:"text",name:"city",value:t.city,onChange:s,placeholder:"Enter city name",className:"w-full px-4 md:px-6 py-3 md:py-4 rounded-xl md:rounded-2xl border-2 border-slate-200 focus:border-primary focus:ring-0 outline-none font-bold text-slate-700 transition-all bg-slate-50/50 placeholder:text-slate-300 placeholder:font-normal text-sm md:text-base"})]})]}),e.jsxs("div",{className:"space-y-2 md:space-y-3",children:[e.jsxs("label",{className:"text-xs font-black uppercase tracking-widest text-slate-500 ml-1 flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"mail"}),"Your Email"]}),e.jsx("input",{type:"email",name:"email",value:t.email,onChange:s,placeholder:"Enter your email address",className:"w-full px-4 md:px-6 py-3 md:py-4 rounded-xl md:rounded-2xl border-2 border-slate-200 focus:border-primary focus:ring-0 outline-none font-bold text-slate-700 transition-all bg-slate-50/50 placeholder:text-slate-300 placeholder:font-normal text-sm md:text-base"})]}),c&&e.jsxs("div",{className:"bg-red-50 border-l-4 border-red-500 p-4 rounded-xl flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-red-500",children:"error"}),e.jsx("p",{className:"text-sm font-bold text-red-700",children:c})]}),e.jsx("div",{className:"pt-4 md:pt-6",children:e.jsx("button",{type:"submit",disabled:r,className:`w-full bg-slate-900 text-white py-4 md:py-5 rounded-xl md:rounded-2xl font-black uppercase tracking-widest text-base md:text-lg hover:bg-primary hover:shadow-[0_10px_20px_-10px_rgba(0,138,69,0.5)] transition-all flex items-center justify-center gap-3 ${r?"opacity-70 cursor-wait":""}`,children:r?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-5 h-5 border-4 border-white border-t-transparent rounded-full animate-spin"}),"SUBMITTING..."]}):e.jsxs(e.Fragment,{children:["SUBMIT APPLICATION",e.jsx("span",{className:"material-symbols-outlined",children:"send"})]})})})]}),e.jsx("p",{className:"mt-6 md:mt-8 text-center text-slate-400 text-xs md:text-sm font-medium",children:"By
1submitting this form, you agree to our Terms and Conditions. We'll never share your data."})]})]})]})};export{w 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.