1import{r as t,j as e,s as V}from"./index-9RYYQKcH.js";const z="https://crm-ia-production-c247.up.railway.app/api",N="#F15923",H=["Massage","Therapeutic Massage","Soothing Massage","Yoga","Sound Therapy","Acupuncture","Energetic Cleaning"];function L(){const[c,E]=t.useState([]),[d,R]=t.useState(""),[m,P]=t.useState(""),[u,W]=t.useState(""),[x,q]=t.useState(""),[v,F]=t.useState(""),[h,A]=t.useState(""),[w,O]=t.useState(""),[o,T]=t.useState(""),[p,B]=t.useState(""),[g,I]=t.useState(""),[y,S]=t.useState(!1),[_,D]=t.useState(!1),[k,b]=t.useState(""),[j,G]=t.useState(!1),$=t.useRef(null),i=s=>j&&s?"border-red-400 bg-red-50":"border-neutral-300",M=s=>E(a=>a.includes(s)?a.filter(C=>C!==s):[...a,s]),Y=async()=>{var a;if(!c.length||!d.trim()||!m.trim()||!u.trim()||!x.trim()||!h||!o.trim()||!p.trim()||!g.trim()){G(!0),b("Please complete the required fields (marked *)."),(a=$.current)==null||a.scrollIntoView({behavior:"smooth",block:"start"});return}S(!0),b("");try{if(!(await fetch(`${z}/public/wellness-quote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({origin:V(),services:c,when:d,guests:m,location:u,property:x,occasion:v,car_rental:h,notes:w,name:o,phone:p,email:g})})).ok)throw new Error;D(!0)}catch{b("Something went wrong â please try again or text us.")}S(!1)};if(_)return e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-3 bg-neutral-50 px-6 text-center",children:[e.jsx("div",{className:"text-5xl",children:"ð§"}),e.jsxs("h1",{className:"text-2xl font-bold text-neutral-900",children:["You're all set",o?`, ${o.split(" ")[0]}`:"","!"]}),e.jsx("p",{className:"max-w-md text-neutral-600",children:"We got your wellness request. Our team will c
1onfirm availability and text you the details shortly."}),e.jsx("a",{href:"https://fixatrippuertorico.com/fix-a-wellness",className:"mt-3 rounded-full px-6 py-3 font-semibold text-white",style:{background:N},children:"Back to Fix a Wellness"})]});const n="mb-1 block text-xs font-bold uppercase tracking-wide text-neutral-500",l="w-full rounded-xl border px-3.5 py-3 text-base sm:py-2.5 sm:text-sm outline-none transition focus:border-[#F15923] focus:ring-2 focus:ring-[#F15923]/20",r=e.jsx("span",{className:"text-red-500",children:" *"}),f=(s,a)=>e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"flex h-6 w-6 items-center justify-center rounded-full text-xs font-bold text-white",style:{background:N},children:s}),e.jsx("h2",{className:"text-lg font-bold text-neutral-900",children:a})]});return e.jsxs("div",{className:"min-h-screen bg-neutral-50",children:[e.jsxs("div",{className:"relative flex h-56 items-center justify-center overflow-hidden sm:h-72",children:[e.jsx("img",{src:"https://images.unsplash.com/photo-1600334089648-b0d9d3028eb2?w=1600&q=80",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/60 via-black/35 to-black/70"}),e.jsxs("a",{href:"/fix-a-wellness","aria-label":"Back",className:"absolute left-4 top-4 z-20 inline-flex items-center gap-1.5 rounded-full bg-black/40 px-3.5 py-2 text-sm font-semibold text-white backdrop-blur-sm transition hover:bg-black/60",children:[e.jsx("span",{"aria-hidden":!0,children:"â"})," Back"]}),e.jsxs("div",{className:"relative px-6 text-center text-white [text-shadow:0_2px_22px_rgba(0,0,0,0.35)]",children:[e.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase tracking-[0.35em] text-white/85",children:"Fix a Wellness · Puerto Rico"}),e.jsx("h1",{className:"font-display text-3xl font-bold leading-tight sm:text-5xl",children:"Book your wellness session"}),e.jsx("p",{className:"mx-auto mt-3 max-w-md text-white/85",children:"Tell us what you'd like and when â we bring the experience to you. Takes about 2 minutes."})]})]}),e.jsxs("div",{ref:$,className:"mx-auto max-w-3xl scroll-mt-4 px-4 pt-8 pb-24",children:[e.jsxs("div",{className:"mb-6 rounded-2xl bg-white p-4 shadow-sm ring-1 ring-neutral-200/70 sm:p-5",children:[f(1,"What would you like?"),e.jsxs("span",{className:n,children:["Service",r," ",e.jsx("span",{className:"font-medium normal-case text-neutral-400",children:"â pick one or more"})]}),e.jsx("div",{className:`flex flex-wrap gap-2 ${j&&!c.length?"rounded-xl p-1 ring-1 ring-red-400":""}`,children:H.map(s=>{const a=c.includes(s);return e.jsx("button",{type:"button",onClick:()=>M(s),className:`rounded-full border px-4 py-2.5 text-base font-medium transition sm:py-1.5 sm:text-sm ${a?"border-transparent bg-[#F15923] text-white":"border-neutral-300 bg-white text-neutral-600 hover:border-neutral-400"}`,children:s},s)})})]}),e.jsxs("div",{className:"mb-6 rounded-2xl bg-white p-4 shadow-sm ring-1 ring-neutral-200/70 sm:p-5",children:[f(2,"When & where"),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"sm:col-span-2",children:[e.jsxs("span",{className:n,children:["Date & time",r]}),e.jsx("input",{type:"datetime-local",value:d,onChange:s=>R(s.target.value),className:`${l} ${i(!d.trim())}`})]}),e.jsxs("div",{children:[e.jsxs("span",{className:n,children:["Guest count",r]}),e.jsx("input",{type:"number",min:"1",value:m,onChange:s=>P(s.target.value),placeholder:"e.g. 2",className:`${l} ${i(!m.trim())}`})]}),e.jsxs("div",{children:[e.jsx("span",{className:n,children:"Special occasion (optional)"}),e.jsx("input",{value:v,onChange:s=>F(s.target.value),placeholder:"Birthday, honeymoonâ¦",className:`${l} border-neutral-300`})]}),e.jsxs("div",{className:"sm:col-span-2",children:[e.jsxs("span",{className:n,children:["Exact event location",r]}),e.jsx("input",{value:u,onChange:s=>W(s.target.value),placeholder:"Address where the session takes place",className:`${l} ${i(!u.trim())}`})]}),e.jsxs("div",{className:"sm:col-span-2",children:[e.jsxs("span",{className:n,children:["Hotel name or Airbnb link",r]}),e.jsx("input",{value:x,onChange:s=>q(s.target.value),placeholder:"https://airbnb.com/rooms/⦠or hotel name",className:`${l} ${i(!x.trim())}`})]}),e.jsxs("div",{className:"sm:col-span-2",children:[e.jsxs("span",{className:n,children:["Do you have a car rental?",r]}),e.jsx("div",{className:`inline-flex gap-2 ${j&&!h?"rounded-xl p-1 ring-1 ring-red-400":""}`,children:[["yes","Yes"],["no","No"]].map(([s,a])=>e.jsx("button",{type:"button",onClick:()=>A(s),className:`rounded-xl border px-7 py-3 text-base font-semibold transition sm:px-6 sm:py-2.5 sm:text-sm ${h===s?"border-transparent bg-[#F15923] text-white":"border-neutral-300 bg-white text-neutral-600 hover:border-neutral-400"}`,children:a},s))})]})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx("span",{className:n,children:"Anything else? (optional)"}),e.jsx("textarea",{value:w,onChange:s=>O(s.target.value),rows:2,placeholder:"Preferences, injuries, questionsâ¦",className:`${l} border-neutral-300`})]})]}),e.jsxs("div",{className:"mb-6 rounded-2xl bg-white p-4 shadow-sm ring-1 ring-neutral-200/70 sm:p-5",children:[f(3,"Where do we confirm it?"),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[e.jsxs("div",{children:[e.jsxs("span",{className:n,children:["Name",r]}),e.jsx("input",{value:o,onChange:s=>T(s.target.value),className:`${l} ${i(!o.trim())}`})]}),e.jsxs("div",{children:[e.jsxs("span",{className:n,children:["Phone",r]}),e.jsx("input",{type:"tel",value:p,onChange:s=>B(s.target.value),placeholder:"Include area code +â¦",className:`${l} ${i(!p.trim())}`})]}),e.jsxs("div",{children:[e.jsxs("span",{className:n,children:["Email",r]}),e.jsx("input",{type:"email",value:g,onChange:s=>I(s.target.value),className:`${l} ${i(!g.trim())}`})]})]})]}),e.jsx("button",{onClick:Y,disabled:y,className:"w-full rounded-xl py-4 text-base font-bold text-white shadow-lg disabled:opacity-50",style:{background:N},children:y?"Sendingâ¦":"Request my session"}),k&&e.jsx("p",{className:"mt-2 text-center text-sm text-red-600",children:k}),e.jsx("p",{className:"mt-3 text-center text-xs text-neutral-400",children:"No payment now â our team confirms availability and sends you the final details."})]})]})}export{L 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.