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{b as l,a6 as L,C as f,e as R,a_ as C}from"./index-CsvIkMoz.js";import{u as P}from"./i18n-vendor-Cl4-lKeC.js";const b=i.forwardRef(({...r},a)=>e.jsx("nav",{ref:a,"aria-label":"breadcrumb",...r}));b.displayName="Breadcrumb";const x=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}));x.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},n)=>{const m=r?L:"a";return e.jsx(m,{ref:n,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(f,{})});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","ko","th","vi","hi","pt","fil","ms","id","my","km","lo"],H=({items:r,className:a=""})=>{const s=k(),{getLocalizedPath:n}=R(),{t:m}=P("navbar"),d=(()=>{if(r)return r.map(t=>({...t,path:n(t.path)}));const o=s.pathname.split("/").filter(Boolean).filter(t=>!z.includes(t)),u=[{name:m("home"),path:n("/")}];let p="";return o.forEach((t,v)=>{if(p+=`/${t}`,t==="story"&&o[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:n(p)})}),u})();return d.length<=1?null:e.jsx("nav",{className:`mb-6 ${a}`,"aria-label":"Breadcrumb",children:e.jsx(b,{children:e.jsx(x,{children:d.map((c,o)=>e.jsxs("div",{className:"contents",children:[e.jsx(g,{children:o===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-forest hover:text-nature-forest transition-colors duration-200 flex items-center gap-1",children:[o===0&&e.jsx(C,{className:"h-4 w-4"}),c.name]})})}),o<d.length-1&&e.jsx(N,{children:e.jsx(f,{className:"h-4 w-4 text-nature-forest/60"})})]},c.path))})})})};export{H as B};
//# sourceMappingURL=BreadcrumbNavigation-tRwsxfJF.js.map