PageSourceSearch

https://fixatrip-pr.vercel.app/assets/Booking-DeNBRBGk.js

js fixatrip-pr.vercel.app collected 2026-10-03 06:57:30 UTC 4,781 bytes, 12 lines download raw bytes

1import{b as P,ay as M,r as o,j as e,S as F,H as $,B as h,l as T,L as E,f as L}from"./index-9RYYQKcH.js";import{L as n,I as i,T as q}from"./label-BY9hWqQn.js";import{C as H}from"./checkbox-Be_iEPz2.js";import{P as I,a as B,f as x,b as D,C as O}from"./popover-OTPjTzmL.js";import{C as R}from"./calendar-CZJu4uHr.js";import{M as A}from"./message-square-DEnWLbSI.js";import{P as G}from"./phone-DhvUfPQo.js";import"./index-CVr3t6el.js";import"./tslib.es6-CmEaCU22.js";const Z=()=>{const{t:s}=P(),{toast:u}=M(),[l,g]=o.useState(""),[d,b]=o.useState(""),[r,j]=o.useState(""),[t,f]=o.useState(),[c,N]=o.useState(""),[m,y]=o.useState(""),[p,k]=o.useState(!1),v=()=>{const a=t?x(t,"MMMM d, yyyy"):"Not selected",S=`Hello! I'd like to book an experience:
2
3👤 Name: ${l}
4📧 Email: ${d}
5📱 Phone: ${r}
6📅 Date: ${a}
7👥 Guests: ${c}
8📝 Notes: ${m}
9
10SMS Consent: ${p?"Yes":"No"}
11
12Please confirm availability. Thank you!`;return encodeURIComponent(S)},C=async()=>{try{await fetch("https://crm-ia-production-c247.up.railway.app/api/webhook/webform",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,email:d,phone:r,date:t?x(t,"yyyy-MM-dd"):"",guests:c,notes:m,source:"booking-page"})})}catch{}},_=()=>{if(!l||!r){u({title:s("booking.required_title"),description:s("booking.required_desc"),variant:"destructive"});return}C(),window.open(`sms:+17874880202?body=${v()}`,"_blank")},w=()=>{window.open("tel:+17874880202","_self")};return e.jsxs(e.Fragment,{children:[e.jsx(F,{title:s("booking.page_title"),description:s("booking.page_desc")}),e.jsx($,{}),e.jsx("main",{className:"min-h-screen pt-24 pb-16 px-4",children:e.jsxs("div",{className:"max-w-lg mx-auto",children:[e.jsx("h1",{className:"text-3xl font-bold font-display text-foreground mb-2 text-center",children:s("booking.heading")}),e.jsx("p",{className:"text-muted-foreground text-center mb-8",children:s("booking.subheading")}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{htmlFor:"name",children:s("booking.fullname")}),e.jsx(i,{id:"name",value:l,onChange:a=>g(a.target.value),placeholder:s("booking.name_ph"),className:"h-12 rounded-xl"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{htmlFor:"email",children:s("booking.email_label")}),e.jsx(i,{id:"email",type:"email",value:d,onChange:a=>b(a.target.value),placeholder:"[email protected]",className:"h-12 rounded-xl"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{htmlFor:"phone",children:s("booking.phone_label")}),e.jsx(i,{id:"phone",type:"tel",value:r,onChange:a=>j(a.target.value),placeholder:"+1 (787) 000-0000",className:"h-12 rounded-xl"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:s("booking.preferred_date")}),e.jsxs(I,{children:[e.jsx(B,{asChild:!0,children:e.jsxs(h,{variant:"outline",className:T("w-full justify-start text-left font-normal h-12 rounded-xl",!t&&"text-muted-foreground"),children:[e.jsx(R,{className:"mr-2 h-4 w-4"}),t?x(t,"PPP"):s("booking.select_date")]})}),e.jsx(D,{className:"w-auto p-0",align:"start",children:e.jsx(O,{mode:"single",selected:t,onSelect:f,disabled:a=>a<new Date,initialFocus:!0,className:"p-3 pointer-events-auto"})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{htmlFor:"guests",children:s("booking.num_guests")}),e.jsx(i,{id:"guests",type:"number",min:"1",value:c,onChange:a=>N(a.target.value),placeholder:"2",className:"h-12 rounded-xl"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{htmlFor:"notes",children:s("booking.notes_label")}),e.jsx(q,{id:"notes",value:m,onChange:a=>y(a.target.value),placeholder:s("booking.notes_ph"),className:"rounded-xl min-h-[80px]"})]}),e.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl border border-border bg-muted/30",children:[e.jsx(H,{id:"sms-consent",checked:p,onCheckedChange:a=>k(a===!0),className:"mt-0.5"}),e.jsxs("label",{htmlFor:"sms-consent",className:"text-sm text-foreground/90 leading-relaxed cursor-pointer",children:[s("booking.sms_consent_en")," ",e.jsx(E,{to:"/privacy-policy",className:"text-primary underline font-medium",children:s("footer.privacy")}),"."]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 ml-0",children:s("booking.sms_required")})]}),e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsxs(h,{onClick:_,className:"w-full rounded-xl h-12 font-semibold text-base gap-2",children:[e.jsx(A,{className:"h-5 w-5"}),s("booking.whatsapp_btn")]}),e.jsxs(h,{onClick:w,variant:"outline",className:"w-full rounded-xl h-12 font-semibold text-base gap-2",children:[e.jsx(G,{className:"h-5 w-5"}),s("booking.call_btn")]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:s("booking.nocharge")}
12)]})]})}),e.jsx(L,{})]})};export{Z 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.