(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4116],{73544:function(e,s,t){Promise.resolve().then(t.bind(t,53471))},53471:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return f}});var a=t(57437),l=t(2265),i=t(99376),r=t(57586),c=t(77077),n=t(61496),d=t(20620),o=t(25763),x=t(38470),m=t(35774),p=t(82681),h=t(37520),u=t(40525),g=t(43409),b=t(10907);function v(){let e=(0,i.useRouter)(),s=(0,u.T)(),{listings:t,isLoading:v}=(0,u.C)(e=>e.marketplaceWishlist);(0,l.useEffect)(()=>{s((0,g.BW)(!0))},[s]);let f=(0,p.p)(),y=t.map(b.pi);return(0,a.jsxs)("div",{className:"min-h-full",style:{background:"var(--bg)"},children:[(0,a.jsxs)("div",{className:"px-4 pt-5 pb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)(n.Z,{size:20,className:"fill-[#fc0000] text-[#fc0000]",strokeWidth:1.5}),(0,a.jsx)("h1",{className:"text-xl font-black",style:{color:"var(--text-primary)"},children:"Wishlist"})]}),(0,a.jsx)("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:v?"Loading…":"".concat(y.length," saved listing").concat(1!==y.length?"s":"")})]}),(0,a.jsxs)("div",{className:"px-4 pb-24",children:[v&&(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 animate-pulse",children:Array.from({length:4}).map((e,s)=>(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden border",style:{background:"var(--card)",borderColor:"var(--border)"},children:[(0,a.jsx)("div",{className:"aspect-[4/3]",style:{background:"var(--deep)"}}),(0,a.jsxs)("div",{className:"p-2.5 space-y-2",children:[(0,a.jsx)("div",{className:"h-3 w-3/4 rounded",style:{background:"var(--deep)"}}),(0,a.jsx)("div",{className:"h-3 w-1/2 rounded",style:{background:"var(--deep)"}})]})]},s))}),!v&&(0,a.jsx)(r.M,{mode:"wait",children:0===y.length?(0,a.jsxs)(c.E.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center py-24 text-center",children:[(0,a.jsx)(c.E.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1,type:"spring",stiffness:260},className:"w-20 h-20 rounded-full flex items-center justify-center mb-5",style:{background:"rgba(252,0,0,0.1)"},children:(0,a.jsx)(n.Z,{size:36,style:{color:"var(--accent)"},strokeWidth:1.5})}),(0,a.jsx)("h2",{className:"text-base font-bold mb-2",style:{color:"var(--text-primary)"},children:"Your wishlist is empty"}),(0,a.jsx)("p",{className:"text-sm mb-6 max-w-[240px]",style:{color:"var(--text-muted)"},children:"Tap the heart icon on any listing to save it here"}),(0,a.jsxs)(c.E.button,{whileTap:{scale:.95},onClick:()=>e.push("/marketplace"),className:"flex items-center gap-2 px-6 py-3 rounded-full font-bold text-sm text-white",style:{background:"var(--accent)"},children:[(0,a.jsx)(d.Z,{size:15}),"Browse Listings"]})]},"empty"):(0,a.jsx)(c.E.div,{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:(0,a.jsx)(r.M,{children:y.map((s,t)=>(0,a.jsxs)(c.E.div,{initial:{opacity:0,scale:.92},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.88,y:-8},transition:{delay:.04*t},layout:!0,whileHover:{y:-3},onClick:()=>e.push("/marketplace/listing/".concat(s.slug)),className:"rounded-2xl overflow-hidden cursor-pointer border",style:{background:"var(--card)",borderColor:"var(--border)"},children:[(0,a.jsxs)("div",{className:"relative aspect-[4/3] bg-[var(--deep)]",children:[(0,a.jsx)("img",{src:s.images[0],alt:s.title,className:"w-full h-full object-cover"}),(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsx)(h.s,{listingId:s.id,size:15,className:"w-7 h-7 rounded-full bg-black/50 backdrop-blur-sm"})}),(0,a.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/70 to-transparent",children:[(0,a.jsx)("span",{className:"text-white font-black text-sm",children:f(s.price)}),s.originalPrice&&(0,a.jsx)("span",{className:"text-white/60 text-[10px] line-through ml-1",children:f(s.originalPrice)})]})]}),(0,a.jsxs)("div",{className:"p-2.5",children:[(0,a.jsx)("p",{className:"text-xs font-semibold line-clamp-2 leading-tight mb-1.5",style:{color:"var(--text-primary)"},children:s.title}),(0,a.jsxs)("div",{className:"flex items-center gap-1 text-[10px] mb-1",style:{color:"var(--text-muted)"},children:[(0,a.jsx)(o.Z,{size:9}),(0,a.jsxs)("span",{className:"truncate",children:[s.area,", ",s.city]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-[10px]",style:{color:"var(--text-muted)"},children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(x.Z,{size:9}),(0,m.Sy)(s.postedAt)]}),s.isNegotiable&&(0,a.jsx)("span",{className:"text-[9px] font-bold px-1.5 py-0.5 rounded-full",style:{background:"rgba(240,192,64,0.15)",color:"var(--accent-gold)"},children:"Negotiable"})]})]})]},s.id))})},"list")})]})]})}function f(){return(0,a.jsx)(v,{})}}},function(e){e.O(0,[2716,5392,4307,301,7077,1114,2309,2971,2117,1744],function(){return e(e.s=73544)}),_N_E=e.O()}]);