1import{r as x,y as u,j as e,z as p,B as f,L as h,A as g,C as b}from"./index-DxRcEN3x.js";import{S as o}from"./skeleton-heu26FCw.js";import{B as j}from"./badge-JaDuVv0z.js";import{S as y}from"./seo-Df9faHNa.js";import{S as d}from"./shopping-bag-DtKaYi_-.js";const N={album:"Albums",book:"Books",shirt:"Shirts",sticker:"Stickers"};function A(){const[t,c]=x.useState("all"),{data:r=[],isLoading:n}=u(void 0,{query:{queryKey:b()}}),i=t==="all"?r:r.filter(s=>(s.category||"other")===t),l=[];for(const s of r){const a=s.category||"other";l.includes(a)||l.push(a)}const m=[{id:"all",label:"All Items"},...l.map(s=>({id:s,label:N[s]??s.charAt(0).toUpperCase()+s.slice(1)}))];return e.jsxs("div",{className:"w-full flex flex-col pt-12 pb-24",children:[e.jsx(y,{path:"/store"}),e.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[e.jsx("div",{className:"flex flex-col md:flex-row justify-between items-center mb-16 gap-8 text-center md:text-left",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"font-display text-5xl md:text-7xl font-black uppercase tracking-tighter",children:["Merch ",e.jsx("span",{className:"text-primary",children:"Store"})]}),e.jsx("p",{className:"text-xl text-muted-foreground font-medium max-w-2xl mt-4",children:"Wear the jokes. Read the books. Listen to the albums."}),e.jsx(p,{className:"mt-4 w-fit mx-auto md:mx-0"})]})}),e.jsx("div",{className:"flex flex-wrap gap-3 mb-12 justify-center md:justify-start",children:m.map(s=>e.jsx(f,{variant:t===s.id?"default":"outline",className:`rounded-full font-bold uppercase tracking-widest text-xs h-10 px-6 ${t===s.id?"bg-primary text-primary-foreground hover:bg-primary/90":"hover:border-primary/50"}`,onClick:()=>c(s.id),children:s.label},s.id))}),n?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8",children:Array(8).fill(0).map((s,a)=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(o,{className:"aspect-[3/4] w-full rounded-2xl"}),e.jsx(o,{className:"h-6 w-3/4"}),e.jsx(o,{className:"h-5 w-1/4"})]},a))}):i.length===0?e.jsxs("div",{className:"text-center py-24 bg-card border rounded-2xl border-dashed",children:[e.jsx(d,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4 opacity-20"}),e.jsx("h3",{className:"font-display font-bold text-2xl uppercase tracking-tight mb-2",children:"No products found"}),e.jsx("p",{className:"text-muted-foreground font-medium",children:"We couldn't find any items in this category."})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-12",children:i.map(s=>e.jsxs(h,{href:`/store/${s.handle}`,className:"group flex flex-col gap-4",children:[e.jsxs("div",{className:"relative aspect-[3/4] rounded-2xl overflow-hidden bg-muted border group-hover:border-primary/50 transition-colors shadow-sm group-hover:shadow-md",children:[s.imageUrl?e.jsx("img",{src:s.imageUrl,alt:s.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105",loading:"lazy",decoding:"async"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-muted-foreground",children:e.jsx(d,{className:"h-10 w-10 opacity-20"})}),e.jsx("div",{className:"absolute top-4 left-4 flex flex-col gap-2",children:s.featured&&e.jsx(j,{className:"bg-black text-white hover:bg-black font-bold uppercase tracking-widest text-[10px] px-3 py-1 rounded-full border-none",children:"Featured"})}),s.soldOut&&e.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm flex items-center justify-center z-10",children:e.jsx("span",{className:"bg-destructive text-destructive-foreground px-6 py-3 font-black uppercase tracking-widest text-sm rounded-full transform -rotate-12 shadow-xl border-4 border-background",children:"Sold Out"})})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-start mb-1",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground",children:s.category}),e.jsx(g,{price:s.price,className:"font-black text-primary text-right"})]}),e.jsx("h3",{className:"font-display font-bold text-xl leading-tight uppercase tracking-tight group-hover:text-primary transition-colors line-clamp-2",children:s.title})]})]},s.handle))})]})]})}export{A 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.