function CollectionCard({p,entry,onRemove}){ const [stock,setStock]=React.useState(null); const [confirming,setConfirming]=React.useState(false); React.useEffect(()=>{setStock(stockInfo(p.id));},[]); const oos=stock&&stock.status==='out-of-stock'; const label=availabilityLabel(stock?stock.status:'in-stock'); const savedPrice=entry&&entry.priceAtAdd; const priceChanged=savedPrice!=null&&savedPrice!==p.price; function moveToBag(){ if(oos)return; BB_STORE.addToCart(p.id,entry&&entry.size?entry.size:'Free Size',1); triggerCollectionToast('Added to Bag'); } function buyNow(){ if(oos)return; BB_STORE.addToCart(p.id,entry&&entry.size?entry.size:'Free Size',1); location.href='Checkout.html'; } return (
{p.name}
{p.name}
{p.sub}{entry&&entry.size?` · ${entry.size}`:''}
{priceChanged?(
{money(savedPrice)}{money(p.price)}
):(
{money(p.price)}
)}
{label}
{confirming&&(
setConfirming(false)} style={{position:'fixed',inset:0,background:'rgba(31,31,31,0.5)',zIndex:400,display:'flex',alignItems:'center',justifyContent:'center',padding:20}}>
e.stopPropagation()} style={{background:'var(--ivory)',borderRadius:'var(--radius-lg)',padding:28,maxWidth:380,textAlign:'center'}}>

Remove this creation from your Collection?

)}
); } function Wishlist(){ const [entries,setEntries]=React.useState([]); React.useEffect(()=>{ document.title='My Collection — Bold Bee'; const upd=()=>setEntries(BB_STORE.wishEntries()); upd(); window.addEventListener('bb-wish-update',upd); return ()=>window.removeEventListener('bb-wish-update',upd); },[]); const items=entries.map(e=>({entry:e,p:productBySlug(e.id)})).filter(i=>i.p); const itemIdsKey=items.map(i=>i.p.id).join(','); const estValue=items.reduce((a,i)=>a+i.p.price,0); React.useEffect(()=>{ if(typeof NotificationStore==='undefined'||!items.length)return; const user=typeof BB_AUTH!=='undefined'?BB_AUTH.currentUser():null; const lastKey='bb_collection_stock_watch'; let last={}; try{last=JSON.parse(localStorage.getItem(lastKey)||'{}');}catch(e){} items.forEach(i=>{ const s=stockInfo(i.p.id); if(last[i.p.id]==='out-of-stock'&&s.status!=='out-of-stock'){ NotificationStore.publish('collection.backInStock',{name:user?user.name:'',email:user?user.email:'',customerId:user?user.id:'',productName:i.p.name}); } last[i.p.id]=s.status; }); localStorage.setItem(lastKey,JSON.stringify(last)); },[itemIdsKey]); function remove(id){ BB_STORE.toggleWishlist(id); } const recCollections=Array.from(new Set(items.map(i=>i.p.collection))); const recommended=PRODUCTS.filter(p=>recCollections.includes(p.collection)&&!items.some(i=>i.p.id===p.id)).slice(0,3); const shareProduct=items[0]?{id:'my-collection',name:`My Collection (${items.length})`,imgs:items[0].p.imgs}:null; return (

My Collection{items.length>0?` (${items.length})`:''}

{shareProduct&&typeof ShareSheet!=='undefined'&&}
{items.length>0&&

Estimated Collection Value {money(estValue)}

} {items.length===0?(

Your Collection Awaits

Every remarkable collection begins with a single creation. Save the pieces that inspire you, and they'll be waiting whenever you're ready to return.

Discover Creations
):(
{items.map(i=>())}
{recommended.length>0&&(
Continue Exploring

You May Also Appreciate

{recommended.map(r=>())}
)}
)}
); } window.Wishlist=Wishlist;