1import{u as m,m as p,Z as g,r as d,j as t,V as f,L as h,$ as y}from"./index-ne90aM0E.js";const x="";function v(e){return e?(/^https?:\/\//i.test(e),e):null}const _={"wedding-ribbon":{title:"Weddings",image:"/ribbons/save_the_date_banner_image_1_jpg.webp",desc:"Elegant satins and delicate laces for your special day."},"christmas-ribbon":{title:"Christmas",image:"/ribbons/red_holly_and_berry_design_in_basket_jpg.webp",desc:"Festive prints, rich velvets, and metallic edges."},"valentine-ribbons":{title:"Valentine's Day",desc:"Hearts, reds and romance for the 14th of February."},"easter-themed-ribbons":{title:"Easter",desc:"Spring pastels, bunnies and blossom prints."},"mothers-day-ribbons":{title:"Mother's Day",desc:"Beautiful ribbons for gifts, bouquets and keepsakes."},"baby-ribbons":{title:"Baby & Christening",image:"/ribbons/Easter_pink_pompom_wreath_1.jpg",desc:"Soft pastels and delicate prints for new arrivals."},"british-themed-ribbon":{desc:"Union Jacks and patriotic prints for celebrations."},"children-s-ribbons":{title:"Children's",desc:"Playful characters and cheerful colours kids love."},"summer-themed-ribbons":{title:"Summer",desc:"Sunny brights and seaside styles for the season."},"ribbon-wreath-kits":{desc:"Everything you need to craft a seasonal wreath."},"halloween-ribbon":{title:"Halloween",desc:"Spooky prints, oranges and blacks for October fun."},"craft-ribbon-bundles-bows":{desc:"Ready-made bows and value bundles for every project."}},b=y.map(e=>{const r=_[e.slug];return{slug:e.slug,title:r?.title??e.label,image:r?.image,desc:r?.desc??`Explore our full range of ${e.label.toLowerCase()} ribbons.`}});function j(){m({entityType:"page",entityId:"occasions",pagePath:"/occasions",fallbackTitle:g.occasions.title,fallbackDescription:p.occasions.description});const[e,r]=d.useState({});return d.useEffect(()=>{let s=!1;const i=b.filter(n=>!n.image);return(async()=>{const n=await Promise.all(i.map(async a=>{try{const l=await fetch(`${x}/api/public/products?category=${encodeURIComponent(a.slug)}&limit=1`);if(!l.ok)return null;const u=await l.json(),c=v(u.products?.[0]?.galleryUrls?.[0]);return c?[a.slug,c]:null}catch{return null}}));if(s)return;const o={};for(const a of n)a&&(o[a[0]]=a[1]);r(o)})(),()=>{s=!0}},[]),t.jsxs("div",{className:"container mx-auto px-4 py-16 min-h-screen",children:[t.jsxs("div",{className:"text-center mb-16",children:[t.jsx("h1",{className:"font-['Dancing_Script'] text-5xl md:text-7xl text-navy mb-4",children:"Shop by Occasion"}),t.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Find the perfect ribbon for every special moment. Each occasion takes you straight to its full collection in the shop."})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:b.map(s=>{const i=s.image?f(s.image):e[s.slug];return t.jsxs(h,{href:`/shop/category/${s.slug}`,className:"group relative overflow-hidden rounded-2xl aspect-square block border border-border/50 shadow-sm",children:[i?t.jsx("img",{src:i,alt:s.title,loading:"lazy",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}):t.jsx("div",{className:"w-full h-full bg-gradient-to-br from-secondary via-secondary/70 to-primary/20"}),t.jsxs("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent flex flex-col justify-end p-8",children:[t.jsx("h2",{className:"text-3xl font-serif font-bold text-white mb-2",children:s.title}),t.jsx("p",{className:"text-white/80 opacity-0 group-hover:opacity-100 transition-opacity duration-300 transform translate-y-4 group-hover:translate-y-0",children:s.desc})]})]},s.slug)})})]})}export{j 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.