import{af as n,$ as o,y as l,K as e,H as m,L as c}from"./index-CqfREQhZ.js";import{P as x}from"./ProductCard-Dr5Cy7e7.js";import"./products-Q1MHi1iw.js";import"./star-DW-815Mn.js";function g(){const{wishlist:r}=n(),[t,d]=o.useState([]);return o.useEffect(()=>{let s=!0;return l().then(i=>{s&&d(i.filter(a=>r.includes(a.id)))}).catch(()=>{}),()=>{s=!1}},[r]),e.jsxs("div",{className:"container mx-auto px-4 py-10",children:[e.jsx("h1",{className:"text-3xl font-bold text-primary mb-2",children:"My Wishlist"}),e.jsxs("p",{className:"text-muted-foreground mb-8",children:[t.length," item",t.length!==1&&"s"," saved"]}),t.length===0?e.jsxs("div",{className:"text-center py-20 bg-card border border-border rounded-2xl",children:[e.jsx(m,{className:"w-16 h-16 mx-auto text-muted-foreground/40"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"No items in your wishlist yet."}),e.jsx(c,{to:"/shop",className:"mt-6 inline-flex bg-brand text-brand-foreground px-6 py-2.5 rounded-full font-semibold",children:"Browse Products"})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-0 md:gap-6 -mx-4 md:mx-0",children:t.map(s=>e.jsx(x,{product:s},s.id))})]})}export{g as component};
