1import{d0 as pe,M as xe,r as m,_ as z,b as X,j as e,S as R,q as w,Z as I,o as ee,s as P,i as U,N as he,O as ge,Q as fe,R as be,w as ye,z as je,v as q,am as we,al as ve}from"./index-DsKq7xQs.js";import{u as Ne}from"./useMutation-BAi7x3yx.js";import{t as re}from"./meta-pixel-DAwDjwzS.js";import{T as ke,a as _e,b as se,c as te}from"./tabs-DLwNjey7.js";import{C as Se}from"./calendar-DI3NtmpP.js";import{C as Ce}from"./checkbox-BCypwogU.js";import{S as Me}from"./switch-3B-N2UIm.js";import{S as $e,a as De,b as Be,c as Pe,d as Te}from"./select-DTPtu2nq.js";import{P as Ae}from"./PaymentConfirmationDialog-kSMH5cBO.js";import{a as Ee,b as qe,c as ze,d as Oe}from"./usePublicBooking-A2Zh6WFC.js";import{P as oe}from"./plus-CsqQBO9H.js";import{S as Fe}from"./shield-check-B62Ns6m5.js";import{A as ae}from"./arrow-right-CB2RGWeY.js";import{A as ie}from"./arrow-left-CIfv5dmi.js";import{f as j,s as Le}from"./format-DxcrcGhw.js";import{a as Re}from"./addDays-DJmzo6d4.js";import{i as Ie}from"./isBefore-uE3iThXb.js";import"./isSameMonth-jsc_OaK-.js";import"./isSameDay-zU9Y8Jhr.js";import"./startOfMonth-CpMN2Yk4.js";import"./addWeeks-ev1iwfxI.js";import"./isAfter-Cp0_huTh.js";import"./addMonths-BKuPpwLP.js";import"./subDays-ChlRpbhS.js";import"./index-BfGmSBt-.js";import"./index-BdQq_4o_.js";import"./circle-check-DcTHd_Ny.js";import"./studio-hours-C8zkTkCL.js";import"./useCustomerBlocks-BOamJ2d7.js";function k(i){const[p,g]=i.split(":"),n=parseInt(p);return`${n%12||12}:${g} ${n>=12?"PM":"AM"}`}function Ue(i,p){const g=[];for(let n=i;n<=p;n+=30){const c=Math.floor(n/60),l=n%60,_=c>0?`${c} hour${c>1?"s":""}${l?` ${l} min`:""}`:`${l} minutes`;g.push({value:n,label:_})}return g}function ne(i,p,g){switch(i.pricing_model){case"free":return 0;case"flat":return i.price||0;case"hourly":{const n=p/60,l=(Array.isArray(i.tiered_packages)?i.tiered_packages:[]).filter(v=>n>=v.min_hours).sort((v,S)=>S.min_hours-v.min_hours);return(l.length>0?l[0].hourly_rate:i.hourly_rate||0)*n}case"per_person":return(i.per_person_rate||0)*g;default:return i.price||0}}function Ke({onBook:i}){return e.jsxs("div",{className:"relative overflow-hidden rounded-3xl border border-white/10 bg-gradient-to-br from-purple-950/40 via-zinc-950/60 to-pink-950/40 backdrop-blur-xl p-10 sm:p-16 text-center",children:[e.jsx("div",{className:"absolute inset-0 opacity-40 pointer-events-none",style:{background:"radial-gradient(600px circle at 50% 0%, hsl(320 80% 50% / 0.3), transparent 60%)"}}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"relative inline-flex mb-6",children:[e.jsx("div",{className:"absolute inset-0 rounded-full bg-gradient-to-r from-pink-500 to-purple-600 blur-2xl opacity-50 animate-pulse"}),e.jsxs("div",{className:"relative h-24 w-24 rounded-full bg-gradient-to-br from-pink-500/30 to-purple-600/30 border border-white/10 flex items-center justify-center",children:[e.jsx(U,{className:"h-12 w-12 text-white"}),e.jsx(R,{className:"absolute -top-1 -right-1 h-5 w-5 text-warning-text animate-pulse"})]})]}),e.jsx("h3",{className:"text-2xl font-black bg-gradient-to-r from-white to-pink-200 bg-clip-text text-transparent mb-2",children:"No upcoming bookings yet â¨"}),e.jsx("p",{className:"text-white/60 max-w-sm mx-auto mb-6",children:"Ready to book some studio time? Reserve a room, schedule a private lesson, or take a tour."}),e.jsxs(w,{onClick:i,size:"lg",className:"bg-gradient-to-r from-pink-500 via-fuchsia-500 to-purple-600 hover:from-pink-400 hover:to-purple-500 text-white border-0 shadow-[0_0_40px_-5px_rgba(236,72,153,0.6)]",children:[e.jsx(oe,{className:"h-4 w-4 mr-2"}),e.jsx("span",{className:"font-bold",children:"Book Now"})]})]})]})}function ws(){const{family:i}=pe(),p=xe(),[g,n]=m.useState(!1),[c,l]=m.useState({open:!1,status:"success",amount:null,reference:null,lines:[]});m.useEffect(()=>{const s=new URLSearchParams(window.location.search),r=s.get("booking_id"),o=s.get("session_id"),y=s.get("payment");r&&o&&y==="success"?(l({open:!0,status:"processing",amount:null,reference:r,lines:[]}),(async()=>{try{const{data:N,error:T}=await P.functions.invoke("verify-booking-payment",{body:{booking_id:r,session_id:o}});if(T)throw T;if(N?.verified){re("Purchase",{content_type:"booking"});const u=N?.booking||{};l({open:!0,status:"success",amount:typeof u.total_price=="number"?u.total_price:null,reference:r,lines:[...u.booking_date?[{label:"Date",value:j(new Date(`${u.booking_date}T12:00:00`),"EEE, MMM d, yyyy")}]:[],...u.start_time&&u.end_time?[{label:"Time",value:`${k(u.start_time)} â ${k(u.end_time)}`}]:[],{label:"Status",value:"Confirmed"}]}),p.invalidateQueries({queryKey:["parent-bookings"]})}else l({open:!0,status:"error",errorMessage:"Your payment is still processing. Do not pay again â refresh in a moment or contact the studio.",amount:null,reference:r,lines:[]})}catch{l({open:!0,status:"error",errorMessage:"We could not confirm your payment yet. Do not pay again â contact the studio if you were charged.",amount:null,reference:r,lines:[]})}window.history.replaceState({},"",window.location.pathname)})()):y==="cancelled"&&(z.error("Payment was cancelled. Your booking is still pending."),window.history.replaceState({},"",window.location.pathname))},[]);const{data:_}=X({queryKey:["family-studio",i?.id],queryFn:async()=>
1{if(!i?.id)return null;const{data:s}=await P.from("families").select("studio_id").eq("id",i.id).single();return s},enabled:!!i?.id}),v=_?.studio_id||null,{data:S,isLoading:C}=X({queryKey:["parent-bookings",i?.id],queryFn:async()=>{if(!i?.id)return[];const{data:s,error:r}=await P.from("bookings").select("*, booking_types!inner(name, color, icon)").eq("family_id",i.id).order("booking_date",{ascending:!1});if(r)throw r;return(s||[]).map(o=>({...o,booking_type_name:o.booking_types?.name,booking_type_color:o.booking_types?.color}))},enabled:!!i?.id}),f=(S||[]).filter(s=>["pending","confirmed"].includes(s.status)&&s.booking_date>=j(new Date,"yyyy-MM-dd")),b=(S||[]).filter(s=>!["pending","confirmed"].includes(s.status)||s.booking_date<j(new Date,"yyyy-MM-dd")),a=Ne({mutationFn:async s=>{const{error:r}=await P.from("bookings").update({status:"cancelled",cancelled_at:new Date().toISOString()}).eq("id",s);if(r)throw r},onSuccess:()=>{p.invalidateQueries({queryKey:["parent-bookings"]}),z.success("Booking cancelled")}}),M={confirmed:{label:"Confirmed",chip:"bg-emerald-500/15 text-success-text border-emerald-400/30",dot:"bg-emerald-400"},pending:{label:"Pending",chip:"bg-amber-500/15 text-warning-text border-amber-400/30",dot:"bg-warning"},cancelled:{label:"Cancelled",chip:"bg-rose-500/15 text-rose-300 border-rose-400/30",dot:"bg-rose-400"},completed:{label:"Completed",chip:"bg-sky-500/15 text-sky-300 border-sky-400/30",dot:"bg-sky-400"},no_show:{label:"No Show",chip:"bg-zinc-500/15 text-zinc-300 border-zinc-400/30",dot:"bg-zinc-400"}},x=({booking:s,isPast:r})=>{const o=s.booking_type_color||"#a855f7",y=M[s.status]||M.pending,D=s.status==="confirmed"&&s.booking_date>=j(new Date,"yyyy-MM-dd"),N=new Date(s.booking_date+"T12:00:00");return e.jsxs("div",{className:"group relative rounded-2xl overflow-hidden border border-white/10 bg-gradient-to-br from-white/[0.04] to-white/[0.01] backdrop-blur-xl transition-all duration-500 hover:-translate-y-1 hover:border-white/20 animate-fade-in",style:{boxShadow:`0 0 0 1px ${o}10, 0 20px 60px -30px ${o}80`},children:[e.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:`radial-gradient(600px circle at var(--x,50%) var(--y,0%), ${o}25, transparent 40%)`}}),e.jsx("div",{className:"absolute top-0 left-0 right-0 h-1",style:{background:`linear-gradient(90deg, ${o}, transparent)`}}),e.jsxs("div",{className:"relative p-5 sm:p-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-4 min-w-0 flex-1",children:[e.jsx("div",{className:"h-14 w-14 rounded-xl flex items-center justify-center shrink-0 border border-white/10",style:{background:`linear-gradient(135deg, ${o}40, ${o}15)`,boxShadow:`0 0 30px ${o}40`},children:e.jsx(U,{className:"h-6 w-6 text-white"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"font-bold text-lg text-white truncate",children:s.booking_type_name}),e.jsxs("div",{className:"mt-2 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white/80",children:[e.jsx(R,{className:"h-3.5 w-3.5 text-warning-text"}),e.jsx("span",{className:"font-semibold",children:j(N,"EEE, MMM d, yyyy")})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white/60",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),k(s.start_time)," â ",k(s.end_time)]}),s.access_code&&e.jsxs("div",{className:"inline-flex items-center gap-2 mt-2 px-3 py-1 rounded-full bg-amber-400/10 border border-amber-400/30",children:[e.jsx(Fe,{className:"h-3 w-3 text-warning-text"}),e.jsxs("span",{className:"text-xs font-mono text-amber-200",children:["Code: ",s.access_code]})]})]})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-2 shrink-0",children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold border ${y.chip}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${y.dot} ${s.status==="confirmed"?"animate-pulse":""}`}),y.label]}),s.total_price>0&&e.jsxs("p",{className:"text-lg font-bold bg-gradient-to-r from-amber-300 to-pink-300 bg-clip-text text-transparent",children:["$",s.total_price.toFixed(2)]})]})]}),D&&!r&&e.jsx("div",{className:"mt-4 pt-4 border-t border-white/5 flex justify-end",children:e.jsx(w,{variant:"ghost",size:"sm",className:"text-rose-300 hover:text-rose-200 hover:bg-rose-500/10",onClick:()=>{confirm("Cancel this booking?")&&a.mutate(s.id)},children:"Cancel Booking"})})]})]})},$=f.length,h=b.length;return e.jsxs("div",{className:"-m-4 md:-m-6 lg:-m-8 min-h-screen bg-gradient-to-b from-[#0a0418] via-[#13072a] to-[#0a0418] text-white",children:[e.jsxs("div",{className:"fixed inset-0 -z-10 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 -left-20 h-96 w-96 rounded-full bg-fuchsia-600/25 blur-3xl"}),e.jsx("div",{className:"absolute top-20 -right-20 h-96 w-96 rounded-full bg-purple-600/25 blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 left-1/3 h-96 w-96 rounded-full bg-amber-500/10 blur-3xl"})]}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6 lg:px-8 py-6 md:py-8 space-y-8",children:[e.jsxs("div",{className:"relative overflow-hidden rounded-3xl border border-white/10 shadow-[0_20px_80px_-20px_rgba(168,85,247,0.5)]",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_30%_50%,rgba(236,72,153,0.35),transparent_50%),radial-gradient(circle_at_70%_50%,rgba(168,85,247,0.35),transparent_50%),linear-gradient(135deg,#0a0418,#1a0b2e,#2a0f3d)]"}),e.jsx("div",{className:"relative p-6 sm:p-8",children:e.jsxs("div",{className:"relative flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/5 border border-white/10 backdrop-blur-sm mb-3",children:[e.jsx(R,{className:"h-3.5 w-3.5 text-warning-text"}),e.jsx("span",{className:"text-xs font-medium text-white/80",children:"Studio Bookings"})]}),e.jsx("h1",{className:"text-3xl sm:text-4xl font-black tracking-tight bg-gradient-to-r from-white via-pink-100 to-amber-200 bg-clip-text text-transparent",children:"My Bookings"}),e.jsx("p",{className:"text-sm sm:text-base text-white/60 mt-2 max-w-xl",children:"Book studio tours, private lessons, room rentals, and more â all in one place."}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-4",children:[e.jsxs("div",{className:"px-3 py-1.5 rounded-lg bg-emerald-500/10 border border-emerald-400/20 text-xs font-semibold text-success-text",children:[$," Upcoming"]}),e.jsxs("div",{className:"px-3 py-1.5 rounded-lg bg-white/5 border border-white/10 text-xs font-semibold text-white/70",children:[h," Past"]})]})]}),e.jsxs(w,{onClick:()=>n(!0),size:"lg",className:"relative group bg-gradient-to-r from-pink-500 via-fuchsia-500 to-purple-600 hover:from-pink-400 hover:to-purple-500 text-white border-0 shadow-[0_0_40px_-5px_rgba(236,72,153,0.6)] hover:shadow-[0_0_50px_-2px_rgba(236,72,153,0.8)] transition-all duration-300",children:[e.jsx("span",{className:"absolute inset-0 rounded-md bg-gradient-to-r from-pink-400 to-purple-500 o
1pacity-0 group-hover:opacity-30 blur-xl transition-opacity"}),e.jsx(oe,{className:"h-4 w-4 mr-2 relative"}),e.jsx("span",{className:"relative font-bold",children:"Book Now"})]})]})})]}),e.jsxs(ke,{defaultValue:"upcoming",className:"space-y-6",children:[e.jsxs(_e,{className:"bg-white/5 border border-white/10 p-1 rounded-full backdrop-blur-xl",children:[e.jsxs(se,{value:"upcoming",className:"rounded-full px-5 data-[state=active]:bg-gradient-to-r data-[state=active]:from-pink-500 data-[state=active]:to-purple-600 data-[state=active]:text-white data-[state=active]:shadow-[0_0_20px_rgba(236,72,153,0.5)]",children:["Upcoming · ",$]}),e.jsxs(se,{value:"past",className:"rounded-full px-5 data-[state=active]:bg-white/10 data-[state=active]:text-white",children:["Past · ",h]})]}),e.jsx(te,{value:"upcoming",className:"space-y-4 mt-0",children:C?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(I,{className:"h-8 w-8 animate-spin text-pink-400"})}):f.length===0?e.jsx(Ke,{onBook:()=>n(!0)}):f.map(s=>e.jsx(x,{booking:s},s.id))}),e.jsx(te,{value:"past",className:"space-y-4 mt-0",children:b.length===0?e.jsxs("div",{className:"text-center py-20 rounded-3xl border border-white/10 bg-white/[0.02] backdrop-blur-xl",children:[e.jsx(ee,{className:"h-10 w-10 mx-auto mb-3 text-white/30"}),e.jsx("p",{className:"text-white/60",children:"No past bookings yet"})]}):b.map(s=>e.jsx(x,{booking:s,isPast:!0},s.id))})]})]}),e.jsx(Qe,{open:g,onOpenChange:n,familyId:i?.id||null,studioId:v,customerName:i?.primary_contact_name||"",customerEmail:i?.primary_email||"",customerPhone:i?.primary_phone||"",onSuccess:()=>p.invalidateQueries({queryKey:["parent-bookings"]})}),e.jsx(Ae,{open:c.open,onOpenChange:s=>l(r=>({...r,open:s})),status:c.status,errorMessage:c.errorMessage,title:"Booking confirmed",description:"Your payment was processed and your booking is confirmed.",amount:c.amount??void 0,reference:c.reference,referenceLabel:"Booking ID",lines:c.lines})]})}function Qe({open:i,onOpenChange:p,familyId:g,studioId:n,customerName:c,customerEmail:l,customerPhone:_,onSuccess:v}){const{data:S}=Ee(n),C=qe(),[f,b]=m.useState(0),[a,M]=m.useState(null),[x,$]=m.useState(void 0),[h,s]=m.useState(null),[r,o]=m.useState(1),[y,D]=m.useState({}),[N,T]=m.useState({}),[u,K]=m.useState(!1),[Q,O]=m.useState(0);m.useEffect(()=>{a&&O(a.duration_minutes||60)},[a]);const A=a?.duration_flexible===!0,V=m.useMemo(()=>!a||!A?[]:Ue(a.min_duration_minutes||30,a.max_duration_minutes||480),[a,A]),le=x?j(x,"yyyy-MM-dd"):null,W=A?Q:a?.duration_minutes||60,{data:F,isLoading:ce}=ze(n,a?.id||null,le,W),{data:E}=Oe(a?.id||null),Y=a?ne(a,W,r):0,de=(E||[]).reduce((t,d)=>y[d.id]?t+(d.price||0):t,0),B=Y+de,me=a?Re(new Date,Math.ceil((a.min_advance_minutes||0)/1440)):new Date,H=()=>{b(0),M(null),$(void 0),s(null),D({}),T({}),K(!1),o(1),O(0)},ue=async()=>{if(!(!a||!x||!h||!n))try{const t=B>0,d=await C.mutateAsync({studio_id:n,booking_type_id:a.id,customer_name:c,customer_email:l,customer_phone:_||void 0,booking_date:j(x,"yyyy-MM-dd"),start_time:h.start,end_time:h.end,total_price:B,intake_responses:Object.keys(N).length>0?N:null,waiver_signature:u?c:void 0,waiver_signed_at:u?new Date().toISOString():void 0,status:t?"pending":"confirmed",payment_status:t?"unpaid":"paid",family_id:g});if(t&&d?.id){const L=a.deposit_required?a.deposit_type==="percentage"?B*(a.deposit_amount/100):a.deposit_amount:B,G=window.location.origin+"/parent/bookings",{data:Z,error:J}=await P.functions.invoke("create-booking-checkout",{body:{booking_id:d.id,studio_id:n,customer_email:l,amount:L,description:`${a.name} â ${j(x,"MMM d, yyyy")} ${h.start}`,success_url:`${G}?payment=success&booking_id=${d.id}&session_id={CHECKOUT_SESSION_ID}`,cancel_url:`${G}?payment=cancelled&booking_id=${d.id}`}});if(J)throw J;if(Z?.url){re("InitiateCheckout",{content_type:"booking"}),window.location.href=Z.url;return}throw new Error("No checkout URL returned")}z.success("Booking confirmed!"),v(),p(!1),H()}catch{z.error("Failed to create booking")}};return e.jsx(he,{open:i,onOpenChange:t=>{t||H(),p(t)},children:e.jsxs(ge,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[e.jsx(fe,{children:e.jsxs(be,{children:[f===0&&"Choose Booking Type",f===1&&"Select Date & Time",f===2&&"Review & Confirm"]})}),f===0&&e.jsx("div",{className:"space-y-3 mt-2",children:(S||[]).map(t=>e.jsx(ye,{className:"cursor-pointer hover:border-primary/50 transition-colors",onClick:()=>{M(t),b(1)},children:e.jsxs(je,{className:"pt-4 flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:t.color+"20"},children:e.jsx(U,{className:"h-5 w-5",style:{color:t.color}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium",children:t.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.duration_minutes," min · ",t.pricing_model==="free"?"Free":`$${t.price}`]})]}),e.jsx(ae,{className:"h-4 w-4 text-muted-foreground"})]})},t.id))}
1),f===1&&a&&e.jsxs("div",{className:"space-y-4 mt-2",children:[e.jsxs(w,{variant:"ghost",size:"sm",onClick:()=>b(0),children:[e.jsx(ie,{className:"h-4 w-4 mr-1"})," Back"]}),A&&V.length>0&&e.jsxs("div",{children:[e.jsx(q,{className:"text-sm mb-1.5 block",children:"Select Duration"}),e.jsxs($e,{value:String(Q),onValueChange:t=>{O(Number(t)),s(null)},children:[e.jsx(De,{className:"max-w-xs",children:e.jsx(Be,{placeholder:"Select duration"})}),e.jsx(Pe,{children:V.map(t=>{const d=a?ne(a,t.value,r):0;return e.jsxs(Te,{value:String(t.value),children:[t.label,d>0?` â $${d.toFixed(2)}`:""]},t.value)})})]}),a.pricing_model==="hourly"&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Estimated: $",Y.toFixed(2)]})]}),e.jsx("div",{className:"flex justify-center",children:e.jsx(Se,{mode:"single",selected:x,onSelect:t=>{$(t),s(null)},disabled:t=>Ie(t,Le(me))})}),x&&e.jsxs("div",{children:[e.jsx(q,{className:"text-sm mb-2 block",children:"Available Times"}),ce?e.jsxs("div",{className:"flex items-center gap-2 py-4",children:[e.jsx(I,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm",children:"Loading..."})]}):F&&F.length>0?e.jsx("div",{className:"grid grid-cols-4 gap-2 max-h-40 overflow-y-auto",children:F.map((t,d)=>e.jsx(w,{variant:h?.start===t.start?"default":"outline",size:"sm",className:"text-xs",onClick:()=>s(t),children:k(t.start)},d))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No available times."})]}),h&&e.jsxs(w,{className:"w-full",onClick:()=>b(2),children:["Continue ",e.jsx(ae,{className:"h-4 w-4 ml-1"})]})]}),f===2&&a&&x&&h&&e.jsxs("div",{className:"space-y-4 mt-2",children:[e.jsxs(w,{variant:"ghost",size:"sm",onClick:()=>b(1),children:[e.jsx(ie,{className:"h-4 w-4 mr-1"})," Back"]}),e.jsxs("div",{className:"bg-muted/50 rounded-lg p-4 space-y-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Type"}),e.jsx("span",{className:"font-medium",children:a.name})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Date"}),e.jsx("span",{className:"font-medium",children:j(x,"MMM d, yyyy")})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Time"}),e.jsxs("span",{className:"font-medium",children:[k(h.start)," â ",k(h.end)]})]}),e.jsx(we,{}),e.jsxs("div",{className:"flex justify-between font-bold",children:[e.jsx("span",{children:"Total"}),e.jsxs("span",{children:["$",B.toFixed(2)]})]})]}),E&&E.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(q,{className:"text-sm",children:"Add-ons"}),E.map(t=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{checked:!!y[t.id],onCheckedChange:d=>D(L=>({...L,[t.id]:!!d}))}),e.jsx("span",{className:"text-sm",children:t.name})]}),e.jsxs("span",{className:"text-sm font-medium",children:["+$",(t.price||0).toFixed(2)]})]},t.id))]}),a.require_waiver&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Me,{checked:u,onCheckedChange:K}),e.jsx(q,{className:"text-sm",children:"I agree to the waiver terms"})]}),e.jsx(w,{className:"w-full",size:"lg",onClick:ue,disabled:C.isPending||a.require_waiver&&!u,children:C.isPending?e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"h-4 w-4 mr-2 animate-spin"})," Confirming..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ve,{className:"h-4 w-4 mr-1"})," Confirm Booking"]})})]})]})})}export{ws 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.