1import{c as n,e as w,u,j as t,S as i,X as b}from"./index-GKo7WnZ0.js";import{f as d}from"./format-BqybvB8p.js";import{S as x}from"./shield-check-ujX4-L1w.js";import{A as f}from"./arrow-right-s2iKELJa.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const y=n("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 7 * @license lucide-react v0.453.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const C=n("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 12 * @license lucide-react v0.453.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const j=n("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function k(){const[,m]=w(),{cart:a,isOpen:r,loading:s,closeCart:c,updateQuantity:o,removeItem:p,proceedToCheckout:h}=u(),l=()=>{c(),m("/shop")};return t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:24",className:`fixed inset-0 z-[60] transition-opacity duration-200 ${r?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"}`,"aria-hidden":!r,children:[t.jsx("button",{"data-loc":"client/src/components/CartDrawer.tsx:30",type:"button",className:"absolute inset-0 bg-black/72",onClick:c,"aria-label":"Close cart",tabIndex:-1}),t.jsxs("aside",{"data-loc":"client/src/components/CartDrawer.tsx:37",role:"dialog","aria-modal":"true","aria-label":"Shopping cart",className:`absolute right-0 top-0 flex h-full w-full max-w-md flex-col border-l border-white/12 bg-[#111111] text-white shadow-2xl transition-transform duration-300 ${r?"translate-x-0":"translate-x-full"}`,children:[t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:45",className:"flex h-[74px] items-center justify-between border-b border-white/10 px-5 sm:px-7",children:[t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:46",className:"flex items-center gap-3",children:[t.jsx(i,{"data-loc":"client/src/components/CartDrawer.tsx:47",className:"h-5 w-5 text-primary"}),t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:48",children:[t.jsx("h2",{"data-loc":"client/src/components/CartDrawer.tsx:48",className:"font-display text-2xl font-bold uppercase tracking-wide",children:"Your cart"}),a?.itemCount?t.jsxs("p",{"data-loc":"client/src/components/CartDrawer.tsx:48",className:"mt-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] text-white/45",children:[a.itemCount," ",a.itemCount===1?"item":"items"," ready to review"]}):null]})]}),t.jsx("button",{"data-loc":"client/src/components/CartDrawer.tsx:50",type:"button",onClick:c,className:"focus-ring button-press flex h-10 w-10 items-center justify-center border border-white/15 text-white/70 hover:text-white","aria-label":"Close cart",children:t.jsx(b,{"data-loc":"client/src/components/CartDrawer.tsx:51",className:"h-5 w-5"})})]}),!a||a.items.length===0?t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:56",className:"flex flex-1 flex-col items-center justify-center px-8 text-center",children:[t.jsx("div",{"data-loc":"client/src/components/CartDrawer.tsx:57",className:"flex h-16 w-16 items-center justify-center border border-white/12 bg-white/[0.03]",children:t.jsx(i,{"data-loc":"client/src/components/CartDrawer.tsx:58",className:"h-6 w-6 text-white/35"})}),t.jsx("h3",{"data-loc":"client/src/components/CartDrawer.tsx:60",className:"font-display mt-6 text-3xl font-bold uppercase",children:"Garage is empty"}),t.jsx("p",{"data-loc":"client/src/components/CartDrawer.tsx:61",className:"mt-3 max-w-xs text-sm leading-6 text-white/50",children:"Add a piece of team gear and weâll have it ready for a secure Shopify checkout."}),t.jsx("button",{"data-loc":"client/src/components/CartDrawer.tsx:64",type:"button",onClick:l,className:"focus-ring button-press mt-7 bg-primary px-6 py-3 text-sm font-semibold text-primary-foreground hover:bg-[#d12d31]",children:"Keep browsing"})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:70",className:"flex-1 overflow-y-auto px-5 py-2 sm:px-7",children:[t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:71",className:"border-b border-white/10 py-5",children:[t.jsx("p",{"data-loc":"client/src/components/CartDrawer.tsx:71",className:"eyebrow text-primary",children:"Order review"}),t.jsx("p",{"data-loc":"client/src/components/CartDrawer.tsx:71",className:"mt-2 text-xs leading-5 text-white/50",children:"Confirm your gear, selected options, and quantities before secure checkout."})]}),a.items.map(e=>t.jsxs("article",{"data-loc":"client/src/components/CartDrawer.tsx:73",className:"grid grid-cols-[88px_1fr] gap-4 border-b border-white/10 py-6",children:[t.jsx("div",{"data-loc":"client/src/components/CartDrawer.tsx:74",className:"aspect-[4/5] overflow-hidden bg-white/[0.04]",children:e.image?t.jsx("img",{"data-loc":"client/src/components/CartDrawer.tsx:76",src:e.image.url,alt:e.image.altText??e.productTitle,className:"h-full w-full object-cover"}):null}),t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:79",className:"min-w-0",children:[t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:80",className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:81",children:[t.jsx("h3",{"data-loc":"client/src/components/CartDrawer.tsx:82",className:"font-display text-xl font-semibold uppercase leading-tight",children:e.productTitle}),e.variantTitle!=="Default Title"?t.jsx("p",{"data-loc":"client/src/components/CartDrawer.tsx:83",className:"mt-1 text-xs text-white/45",children:e.variantTitle}):null]}),t.jsx("button",{"data-loc":"client/src/components/CartDrawer.tsx:85",type:"button",onClick:()=>p(e.lineId),disabled:s,className:"focus-ring text-white/35 transition-colors hover:text-primary disabled:opacity-40","aria-label":`Remove ${e.productTitle}`,children:t.jsx(j,{"data-loc":"client/src/components/CartDrawer.tsx:86",className:"h-4 w-4"})})]}),t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:89",className:"mt-2 flex items-baseline justify-between gap-3",children:[t.jsx("p",{"data-loc":"client/src/components/CartDrawer.tsx:89",className:"text-sm font-semibold text-white",children:d(e.lineTotal)}),t.jsx("p",{"data-loc":"client/src/components/CartDrawer.tsx:89",className:"text-[10px] font-medium uppercase tracking-wider text-white/38",children:"Line total"})]}),t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:90",className:"mt-4 inline-flex items-center border border-white/14",children:[t.jsx("button",{"data-loc":"client/src/components/CartDrawer.tsx:91",type:"button",onClick:()=>o(e.lineId,e.quantity-1),disabled:s,className:"focus-ring flex h-9 w-9 items-center justify-center text-white/65 hover:text-white disabled:opacity-40","aria-label":`Decrease ${e.productTitle} quantity`,children:t.jsx(y,{"data-loc":"client/src/components/CartDrawer.tsx:91",className:"h-3.5 w-3.5"})}),t.jsx("span",{"data-loc":"client/src/components/CartDrawer.tsx:92",className:"flex h-9 min-w-9 items-center justify-center border-x border-white/14 text-xs font-semibold",children:e.quantity}),t.jsx("button",{"data-loc":"client/src/components/CartDrawer.tsx:93",type:"button",onClick:()=>o(e.lineId,e.quantity+1),disabled:s,className:"focus-ring flex h-9 w-9 items-center justify-center text-white/65 hover:text-white disabled:opacity-40","aria-label":`Increase ${e.productTitle} quantity`,children:t.jsx(C,{"data-loc":"client/src/components/CartDrawer.tsx:93",className:"h-3.5 w-3.5"})})]})]})]},e.lineId))]}),t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:100",className:"border-t border-white/12 bg-[#0d0d0d] p-5 sm:p-7",children:[t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:101",className:"flex items-center justify-between",children:[t.jsx("span",{"data-loc":"client/src/components/CartDrawer.tsx:102",className:"eyebrow text-white/50",children:"Subtotal"}),t.jsx("span",{"data-loc":"client/src/components/CartDrawer.tsx:103",className:"font-display text-2xl font-bold",children:d(a.subtotal)})]}),t.jsxs("div",{"data-loc":"client/src/components/CartDrawer.tsx:105",className:"mt-3 flex items-start gap-2 border-l-2 border-primary/70 pl-3 text-xs leading-5 text-white/52",children:[t.jsx(x,{"data-loc":"client/src/components/CartDrawer.tsx:105",className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-primary"}),t.jsx("p",{"data-loc":"client/src/components/CartDrawer.tsx:105",children:"Review complete? Shipping and taxes are calculated securely at checkout."})]}),t.jsxs("button",{"data-loc":"client/src/components/CartDrawer.tsx:106",type:"button",onClick:h,disabled:s||a.itemCount===0,className:"focus-ring button-press mt-5 flex w-full items-center justify-center gap-2 bg-primary px-5 py-4 text-sm font-semibold text-primary-foreground hover:bg-[#d12d31] disabled:cursor-not-allowed disabled:opacity-50",children:[t.jsx(x,{"data-loc":"client/src/components/CartDrawer.tsx:112",className:"h-4 w-4"}),s?"Updatingâ¦":"Secure checkout"]}),t.jsxs("button",{"data-loc":"client/src/components/CartDrawer.tsx:115",type:"button",onClick:l,disabled:s,className:"focus-ring button-press mt-3 flex w-full items-center justify-center gap-2 border border-white/18 px-5 py-3 text-xs font-semibold text-white/75 hover:border-primary hover:text-white disabled:opacity-40",children:["Continue shopping ",t.jsx(f,{"data-loc":"client/src/components/CartDrawer.tsx:115",className:"h-3.5 w-3.5"})]})]})]})]})]})}export{k 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.