veza/apps/web/dist_verification/assets/WishlistView-Becoqfzm.js
senke 670282989b chore(refactor/sumi-migration): commit pending changes — tests, stream server, dist_verification
- apps/web: test updates (Vitest/setup), playbackAnalyticsService, TrackGrid, serviceErrorHandler
- veza-common: logging, metrics, traits, validation, random
- veza-stream-server: audio pipeline, codecs, cache, monitoring, routes
- apps/web/dist_verification: refresh build assets (content-hashed filenames)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 19:39:18 +01:00

1 line
4.9 KiB
JavaScript

import{a as i,j as e}from"./vendor-react-C9dYU-TK.js";import{u as v,S as a,E as j,B as r,C as b}from"./index-BMBS6scK.js";import{u as w}from"./cartStore-DGmCKIAR.js";import{o as N,p as y,q as C,r as S,Z as k,i as T}from"./vendor-icons-BSV6HBy1.js";import{m}from"./vendor-motion-CbAtAbUE.js";import"./vendor-CjLUfV8Y.js";import"./vendor-security-DsrNJhpn.js";import"./vendor-router-Dr0ZB7zf.js";import"./vendor-tanstack-C4XaEYj2.js";import"./vendor-http-CctT3C58.js";import"./vendor-utils-D0JLFg89.js";import"./vendor-i18n-PN7w4axr.js";const A={visible:{transition:{staggerChildren:.06,delayChildren:.04}}},D={hidden:{opacity:0,y:16,scale:.97},visible:{opacity:1,y:0,scale:1,transition:{duration:.35,ease:[.33,1,.68,1]}}},E=[{id:"w1",title:"Analog Dreams Vol. 2",type:"sample_pack",price:24.99,currency:"USD",rating:4.8,coverUrl:"https://picsum.photos/id/40/300/300",author:"Vintage Synths",description:"Warm analog pads and leads.",features:[],licenses:[]},{id:"w2",title:"Tech House Essentials",type:"preset",price:19.99,currency:"USD",rating:4.5,coverUrl:"https://picsum.photos/id/45/300/300",author:"Club Ready",description:"Floor filling serum presets.",features:[],licenses:[]},{id:"w3",title:"Cinematic FX",type:"sample_pack",price:34.5,currency:"USD",rating:5,coverUrl:"https://picsum.photos/id/50/300/300",author:"Sound Design Co",isHot:!0,description:"Impacts, risers, and drops.",features:[],licenses:[]}],F=()=>{const l=w(s=>s.addItem),{addToast:o}=v(),[x]=i.useState(!1),[t,n]=i.useState(E),[d,h]=i.useState(null),c=s=>{n(f=>f.filter(g=>g.id!==s)),o("Removed from wishlist","info")},p=s=>{l(s),c(s.id)},u=()=>{t.forEach(s=>l(s)),n([]),o("All items moved to cart","success")};return x?e.jsxs("div",{className:"max-w-6xl mx-auto pb-20",children:[e.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-end border-b border-border/50 pb-6 gap-4 mb-8",children:[e.jsxs("div",{children:[e.jsx(a,{className:"h-9 w-48 mb-2"}),e.jsx(a,{variant:"text",className:"w-32"})]}),e.jsx(a,{className:"h-10 w-44"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3].map(s=>e.jsx(a,{className:"h-96 w-full rounded-lg"},s))})]}):t.length===0?e.jsx(j,{variant:"centered",icon:e.jsx(N,{className:"w-full h-full"}),title:"Your wishlist is empty",description:"Explore the marketplace and save items you love.",action:{label:"Browse Marketplace",onClick:()=>window.location.href="/marketplace"},size:"lg",className:"min-h-96"}):e.jsxs("div",{className:"animate-fadeIn max-w-6xl mx-auto pb-20",children:[e.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-end border-b border-border/50 pb-6 gap-4 mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-foreground mb-2 tracking-tight",children:"WISHLIST"}),e.jsxs("p",{className:"text-muted-foreground font-mono text-sm",children:[t.length," saved items"]})]}),e.jsx(r,{variant:"primary",icon:e.jsx(y,{className:"w-4 h-4"}),onClick:u,children:"ADD ALL TO CART"})]}),e.jsx(m.div,{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",variants:A,initial:"hidden",animate:"visible",children:t.map(s=>e.jsx(m.div,{variants:D,children:e.jsxs(b,{variant:"default",className:"p-4 group hover:border-border/50 hover:shadow-lg transition-all duration-[var(--sumi-duration-normal)]",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("div",{className:"relative w-24 h-24 bg-muted rounded-lg overflow-hidden flex-shrink-0",children:[e.jsx("img",{src:s.coverUrl,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-[var(--sumi-duration-slow)]"}),e.jsx("div",{className:"absolute inset-0 bg-black/40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",onClick:()=>h(d===s.id?null:s.id),children:d===s.id?e.jsx(C,{className:"w-8 h-8 text-foreground"}):e.jsx(S,{className:"w-8 h-8 text-foreground fill-current"})}),s.isHot&&e.jsxs("div",{className:"absolute top-1 left-1 bg-warning text-warning-foreground text-xs font-bold px-1.5 py-0.5 rounded",children:[e.jsx(k,{className:"w-2 h-2 inline"})," HOT"]})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-foreground truncate",children:s.title}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.author}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 capitalize",children:s.type})]}),e.jsxs("div",{className:"text-lg font-mono font-bold text-muted-foreground",children:["$",s.price]})]})]}),e.jsxs("div",{className:"flex gap-2 mt-4 pt-4 border-t border-border/30",children:[e.jsx(r,{variant:"secondary",size:"sm",className:"flex-1",onClick:()=>p(s),children:"Add to Cart"}),e.jsx(r,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive",onClick:()=>c(s.id),children:e.jsx(T,{className:"w-4 h-4"})})]})]})},s.id))})]})};export{F as WishlistView};