PageSourceSearch

https://spotz.global/assets/app.book._slug-CWnNmgkL.js

js spotz.global collected 2026-10-09 22:06:18 UTC 4,818 bytes, 1 lines download raw bytes

1import{c as S,ac as z,f as C,r as a,ad as P,j as e,L as q,M as I,ae as L}from"./index-bQZ6-MOf.js";import{u as D}from"./useQuery-BAgesPRj.js";import{u as E}from"./i18n-XMYVLjL7.js";import{u as O}from"./cart-JQk-nSsC.js";import{e as R}from"./queries-H9iHQtOY.js";import{A as $}from"./arrow-left-NVxwppvD.js";import{M as A}from"./moon-DxXU8gEN.js";import{S as T}from"./sun-BVTs4wBC.js";import{C as _}from"./chevron-up-gSPmVLc9.js";import{C as B}from"./chevron-down-D6XLa2aq.js";import{M as F}from"./minus-CWUlcQZK.js";import{P as K}from"./plus-BTpNNBeh.js";import"./suspense-IMGYCAfs.js";const H=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],Q=S("sunrise",H),U={breakfast:Q,lunch:T,dinner:A};function ie(){const{slug:n}=z.useParams(),h=C(),{t}=E(),{cart:o,setReservation:b,setServiceMode:f,setMerchant:j}=O(),r=D({queryKey:["spotz","merchant",n],queryFn:()=>R(n)}).data,m=a.useMemo(()=>P(14),[]),[x,N]=a.useState(o.reservation?.date??m[0].iso),[g,y]=a.useState(o.reservation?.period??null),[i,v]=a.useState(o.reservation?.period??null),[c,k]=a.useState(o.reservation?.time??""),[p,u]=a.useState(o.reservation?.persons??1),w=()=>{!r||!i||!c||(j({id:r.id,slug:r.slug,name:r.name,currency:r.currency}),f("reservation"),b({date:x,period:i,time:c,persons:p}),h({to:"/app/dishes/$slug",params:{slug:n}}))};return e.jsxs("div",{className:"space-y-5 pb-28",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(q,{to:"/app/m/$slug",params:{slug:n},search:{table:void 0},className:"text-muted-foreground",children:e.jsx($,{className:"w-4 h-4"})}),e.jsx("h1",{className:"text-lg font-semibold",children:t("book.title")})]}),e.jsxs("div",{className:"spotz-card p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium mb-2.5",children:t("book.when")}),e.jsx("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide -mx-4 px-4 pb-1",children:m.map(s=>e.jsxs("button",{onClick:()=>N(s.iso),className:`w-[74px] shrink-0 rounded-2xl py-2.5 text-center border ${x===s.iso?"spotz-tab-active border-transparent font-semibold":"border-[color:rgba(0,200,150,0.2)] text-muted-foreground"}`,children:[e.jsx("span",{className:"block text-[11px]",children:s.isToday?t("book.today"):s.weekday}),e.jsx("span",{className:"block text-xs mt-0.5",children:s.day})]},s.iso))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:t("book.selectTime")}),e.jsx("div",{className:"space-y-2",children:I.map(s=>{const M=U[s.id],d=g===s.id;return e.jsxs("div",{className:"rounded-2xl bg-[color:rgba(0,200,150,0.06)] overflow-hidden",children:[e.jsxs("button",{onClick:()=>y(d?null:s.id),className:"w-full flex items-center gap-3 px-3.5 py-3 text-left",children:[e.jsx(M,{className:"w-4 h-4 spotz-mint"}),e.jsxs("span",{className:"flex-1",children:[e.jsx("span",{className:"block text-sm font-medium",children:t(s.labelKey)}),e.jsx("span",{className:"block text-[11px] text-muted-foreground",children:s.window})]}),d?e.jsx(_,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(B,{className:"w-4 h-4 text-muted-foreground"})]}),d&&e.jsx("div",{className:"grid grid-cols-3 gap-2 px-3.5 pb-3.5",children:L(s.id).map(l=>e.jsx("button",{onClick:()=>{v(s.id),k(l)},className:`rounded-xl py-2 text-xs border ${i===s.id&&c===l?"spotz-tab-active border-transparent font-semibold":"border-[color:rgba(0,200,150,0.2)] text-muted-foreground"}`,children:l},l))})]},s.id)})})]}),e.jsxs("div",{className:"flex items-center justify-between pt-1",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:t("book.persons")}),e.jsx("p",{className:"text-lg font-semibold spotz-mint",children:p})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>u(s=>Math.max(1,s-1)),className:"h-9 w-9 rounded-full border border-[color:rgba(0,200,150,0.3)] flex items-center justify-center","aria-label":"-",children:e.jsx(F,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>u(s=>Math.min(40,s+1)),className:"h-9 w-9 rounded-full border border-[color:rgba(0,200,150,0.3)] flex items-center justify-center","aria-label":"+",children:e.jsx(K,{className:"w-4 h-4"})})]})]})]}),e.jsx("div",{className:"fixed bottom-[72px] inset-x-0 z-30 px-5",children:e.jsx("div",{className:"mx-auto max-w-2xl",children:e.jsx("button",{onClick:w,disabled:!i||!c,className:"w-full rounded-full spotz
1-bg-mint text-[#04120d] font-semibold py-3.5 spotz-glow disabled:opacity-50",children:t("common.proceed")})})})]})}export{ie 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.