1import{c as v,b as r,j as e,x as m}from"./index-DRjyd7yc.js";import{S as N,c as w}from"./SiteFooter-CIQGvrZl.js";import{M as S}from"./mail-DEN_x9AS.js";import{M as k}from"./map-pin-CDXTKIEz.js";const C=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],P=v("phone",C);function F(){const[t,s]=r.useState(""),[n,x]=r.useState(""),[o,p]=r.useState(""),[c,g]=r.useState(""),[h,f]=r.useState(""),[d,b]=r.useState(!1);async function j(a){if(a.preventDefault(),!d){if(!t.trim()||!n.trim()||!o.trim()||!c.trim()){m.error("Please fill in every field.");return}b(!0);try{const i=await fetch("/api/public/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,email:n,subject:o,message:c,website:h})});if(!i.ok){const y=await i.json().catch(()=>({}));throw new Error(y?.error||"Failed to send")}m.success("Thanks â your message is on its way to our team."),s(""),x(""),p(""),g("")}catch(i){console.error(i),m.error("Sorry, we couldn't send your message. Please try again or email [email protected].")}finally{b(!1)}}}return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(N,{}),e.jsxs("section",{className:"container-x py-20 md:py-28",children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-primary",children:"Contact"}),e.jsx("h1",{className:"mt-2 font-display text-4xl md:text-5xl",children:"Talk to a human"}),e.jsx("p",{className:"mt-3 max-w-2xl text-muted-foreground",children:"Our small team is based in the UK and France and reachable seven days a week during the season."}),e.jsxs("div",{className:"mt-12 grid gap-10 lg:grid-cols-[1fr_2fr]",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsx(u,{icon:e.jsx(S,{size:18}),label:"Email",value:"[email protected]"}),e.jsx(u,{icon:e.jsx(P,{size:18}),label:"Phone",value:"+44 (0)118 907 0388"}),e.jsx(u,{icon:e.jsx(k,{size:18}),label:"Office",value:"Purley on Thames, Reading, United Kingdom"})]}),e.jsxs("form",{onSubmit:j,className:"grid gap-4 rounded-2xl border border-border bg-card p-6 md:p-8",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsx(l,{label:"Name",children:e.jsx("input",{value:t,onChange:a=>s(a.target.value),required:!0,className:"w-full bg-transparent text-sm outline-none"})}),e.jsx(l,{label:"Email",children:e.jsx("input",{type:"email",value:n,onChange:a=>x(a.target.value),required:!0,className:"w-full bg-transparent text-sm outline-none"})})]}),e.jsx(l,{label:"Subject",children:e.jsx("input",{value:o,onChange:a=>p(a.target.value),required:!0,className:"w-full bg-transparent text-sm outline-none"})}),e.jsx(l,{label:"Message",children:e.jsx("textarea",{value:c,onChange:a=>g(a.target.value),required:!0,rows:6,className:"w-full bg-transparent text-sm outline-none"})}),e.jsx("input",{type:"text",tabIndex:-1,autoComplete:"off",value:h,onChange:a=>f(a.target.value),className:"hidden","aria-hidden":"true"}),e.jsx("button",{type:"submit",disabled:d,className:"justify-self-start rounded-full bg-primary px-6 py-3 text-sm font-medium text-primary-foreground disabled:opacity-60",children:d?"Sending...":"Send message"})]})]})]}),e.jsx(w,{})]})}function u({icon:t,label:s,value:n}){return e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"mt-0.5 grid h-9 w-9 place-items-center rounded-lg bg-primary-soft text-primary",children:t}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:s}),e.jsx("p",{className:"font-medium",children:n})]})]})}function l({label:t,children:s}){return e.jsxs("label",{className:"block rounded-xl border border-border bg-background px-4 py-3 focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/10",children:[e.jsx("span",{className:"block text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:t}),e.jsx("div",{className:"mt-1",children:s})]})}export{F 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.