import{r as l,k as p,j as e,H as b,q as g,L as j,U as y,x as N,n as c,F as w}from"./index-ByWyF7sJ.js";import{Input as t}from"./input-CMHs4Xzq.js";import{Label as r}from"./label-DX64E2SV.js";import{T as v}from"./textarea-Buc9E819.js";import{C as S}from"./chevron-right-CxVHcv8y.js";const R="/assets/refer-hero-nUR7xxSF.jpg",L=()=>{const[s,a]=l.useState(!1),[m,n]=l.useState(!1),{toast:d}=p(),h=async i=>{i.preventDefault(),a(!0);const o=i.currentTarget,f=new FormData(o);try{if((await fetch("/",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(f).toString()})).ok)n(!0),o.reset();else throw new Error("Form submission failed")}catch{d({title:"Submission Error",description:"There was a problem submitting your referral. Please try again or call us directly.",variant:"destructive"})}finally{a(!1)}},x={"@context":"https://schema.org","@type":"BreadcrumbList","@id":"https://coffeyagencies.com/refer#breadcrumb",name:"Breadcrumb Navigation",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://coffeyagencies.com/"},{"@type":"ListItem",position:2,name:"Refer a Friend",item:"https://coffeyagencies.com/refer"}]};return e.jsxs(e.Fragment,{children:[e.jsxs(b,{children:[e.jsx("title",{children:"Refer a Friend | Coffey Agencies Referral Program"}),e.jsx("meta",{name:"description",content:"Know someone who needs insurance? Refer them to Coffey Agencies and help your friends and family get great coverage in Alabama & Georgia."}),e.jsx("link",{rel:"canonical",href:"https://coffeyagencies.com/refer"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(x)})]}),e.jsx(g,{}),e.jsxs("main",{id:"main-content",children:[e.jsxs("section",{className:"relative min-h-[400px] md:min-h-[450px] flex items-end py-16 md:py-20",style:{backgroundImage:`url(${R})`,backgroundSize:"cover",backgroundPosition:"center"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/40 to-black/20"}),e.jsxs("div",{className:"container-custom relative z-10",children:[e.jsx("nav",{"aria-label":"Breadcrumb",className:"mb-6",children:e.jsxs("ol",{className:"flex items-center gap-2 text-sm text-white/80",children:[e.jsx("li",{children:e.jsx(j,{to:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx(S,{className:"h-4 w-4"}),e.jsx("li",{className:"text-white font-medium",children:"Refer a Friend"})]})}),e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-white/10 flex items-center justify-center",children:e.jsx(y,{className:"h-8 w-8 text-white"})}),e.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-white drop-shadow-lg",children:"Refer a Friend"})]}),e.jsx("p",{className:"text-lg md:text-xl text-white/90 max-w-2xl leading-relaxed drop-shadow-md",children:"Know someone who needs an insurance quote? Send them our way. When your referral gets a quote, we'll thank you with a gift card."}),e.jsx("p",{className:"text-lg text-white/80 mt-4 drop-shadow-md",children:"Just share their contact info with us. We'll handle the rest."})]})]}),e.jsx("section",{className:"py-16 md:py-20 bg-background",children:e.jsxs("div",{className:"container-custom max-w-2xl",children:[m?e.jsxs("div",{className:"bg-accent/10 border border-accent/20 rounded-xl p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-accent/20 flex items-center justify-center mx-auto mb-4",children:e.jsx(N,{className:"h-8 w-8 text-accent"})}),e.jsx("h2",{className:"text-2xl font-bold text-foreground mb-2",children:"Thank You!"}),e.jsx("p",{className:"text-muted-foreground text-lg",children:"We'll reach out to your referral and have your gift card ready for pickup."}),e.jsx(c,{onClick:()=>n(!1),variant:"outline",className:"mt-6",children:"Submit Another Referral"})]}):e.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 md:p-8 shadow-sm",children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:"Submit a Referral"}),e.jsxs("form",{name:"referral-form",method:"POST","data-netlify":"true","data-netlify-honeypot":"bot-field",onSubmit:h,className:"space-y-6",children:[e.jsx("input",{type:"hidden",name:"form-name",value:"referral-form"}),e.jsx("input",{type:"hidden",name:"bot-field"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground border-b pb-2",children:"Your Information"}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"your-name",children:"Your Name *"}),e.jsx(t,{id:"your-name",name:"your-name",type:"text",required:!0,placeholder:"John Smith",className:"min-h-[44px]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"your-phone",children:"Your Phone *"}),e.jsx(t,{id:"your-phone",name:"your-phone",type:"tel",required:!0,placeholder:"(555) 555-5555",className:"min-h-[44px]"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground border-b pb-2",children:"Referral's Information"}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"referral-name",children:"Referral's Name *"}),e.jsx(t,{id:"referral-name",name:"referral-name",type:"text",required:!0,placeholder:"Jane Doe",className:"min-h-[44px]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"referral-phone",children:"Referral's Phone *"}),e.jsx(t,{id:"referral-phone",name:"referral-phone",type:"tel",required:!0,placeholder:"(555) 555-5555",className:"min-h-[44px]"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"notes",children:"Notes (optional)"}),e.jsx(v,{id:"notes",name:"notes",placeholder:"Any additional information about your referral...",className:"min-h-[100px]"})]})]}),e.jsx(c,{type:"submit",size:"lg",className:"w-full bg-accent hover:bg-accent/90 text-accent-foreground min-h-[44px]",disabled:s,children:s?"Submitting...":"Submit Referral"})]})]}),e.jsx("p",{className:"text-center text-sm text-muted-foreground mt-8",children:"No purchase necessary."})]})})]}),e.jsx(w,{})]})};export{L as default};