import{j as e}from"./query-vendor-CZu0EHPe.js";import{r as i,f as k,L as w}from"./react-vendor-0bvDbF03.js";import{C as l,a2 as L,a3 as b,b as R,H as C}from"./index-HnpjXQh_.js";import{u as P}from"./i18n-vendor-Cl4-lKeC.js";const x=i.forwardRef(({...r},a)=>e.jsx("nav",{ref:a,"aria-label":"breadcrumb",...r}));x.displayName="Breadcrumb";const f=i.forwardRef(({className:r,...a},s)=>e.jsx("ol",{ref:s,className:l("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",r),...a}));f.displayName="BreadcrumbList";const g=i.forwardRef(({className:r,...a},s)=>e.jsx("li",{ref:s,className:l("inline-flex items-center gap-1.5",r),...a}));g.displayName="BreadcrumbItem";const j=i.forwardRef(({asChild:r,className:a,...s},o)=>{const m=r?L:"a";return e.jsx(m,{ref:o,className:l("transition-colors hover:text-foreground",a),...s})});j.displayName="BreadcrumbLink";const B=i.forwardRef(({className:r,...a},s)=>e.jsx("span",{ref:s,role:"link","aria-disabled":"true","aria-current":"page",className:l("font-normal text-foreground",r),...a}));B.displayName="BreadcrumbPage";const N=({children:r,className:a,...s})=>e.jsx("li",{role:"presentation","aria-hidden":"true",className:l("[&>svg]:size-3.5",a),...s,children:r??e.jsx(b,{})});N.displayName="BreadcrumbSeparator";const S={stories:"stories",about:"about",contact:"contact",subscription:"premiumPlans",progress:"progress",vocabulary:"vocabulary","reading-cart":"readingCart","improve-reading":"improveReading",blog:"blog",themes:"themes","story-maker":"storyMaker",privacy:"privacy",terms:"terms",refund:"refund",research:"research","text-checker":"textChecker"},z=["en","es","bn","zh","ja"],A=({items:r,className:a=""})=>{const s=k(),{getLocalizedPath:o}=R(),{t:m}=P("navbar"),d=(()=>{if(r)return r.map(t=>({...t,path:o(t.path)}));const n=s.pathname.split("/").filter(Boolean).filter(t=>!z.includes(t)),u=[{name:m("home"),path:o("/")}];let p="";return n.forEach((t,v)=>{if(p+=`/${t}`,t==="story"&&n[v+1])return;const h=S[t],y=h?m(h):t.charAt(0).toUpperCase()+t.slice(1).replace(/-/g," ");u.push({name:y,path:o(p)})}),u})();return d.length<=1?null:e.jsx("nav",{className:`mb-6 ${a}`,"aria-label":"Breadcrumb",children:e.jsx(x,{children:e.jsx(f,{children:d.map((c,n)=>e.jsxs("div",{className:"contents",children:[e.jsx(g,{children:n===d.length-1?e.jsx(B,{className:"text-nature-red font-medium",children:c.name}):e.jsx(j,{asChild:!0,children:e.jsxs(w,{to:c.path,className:"text-nature-green hover:text-nature-teal transition-colors duration-200 flex items-center gap-1",children:[n===0&&e.jsx(C,{className:"h-4 w-4"}),c.name]})})}),n<d.length-1&&e.jsx(N,{children:e.jsx(b,{className:"h-4 w-4 text-nature-green/60"})})]},c.path))})})})};export{A as B};
//# sourceMappingURL=BreadcrumbNavigation-C4q2SlEN.js.map