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,b as l,aD as R,C as f,e as C}from"./index-Tnu_QckE.js";import{u as P}from"./i18n-vendor-Bg2yf_Zw.js";/**
 * @license lucide-react v0.554.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const S=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],z=L("house",S),b=i.forwardRef(({...a},r)=>e.jsx("nav",{ref:r,"aria-label":"breadcrumb",...a}));b.displayName="Breadcrumb";const x=i.forwardRef(({className:a,...r},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",a),...r}));x.displayName="BreadcrumbList";const g=i.forwardRef(({className:a,...r},s)=>e.jsx("li",{ref:s,className:l("inline-flex items-center gap-1.5",a),...r}));g.displayName="BreadcrumbItem";const j=i.forwardRef(({asChild:a,className:r,...s},n)=>{const m=a?R:"a";return e.jsx(m,{ref:n,className:l("transition-colors hover:text-foreground",r),...s})});j.displayName="BreadcrumbLink";const v=i.forwardRef(({className:a,...r},s)=>e.jsx("span",{ref:s,role:"link","aria-disabled":"true","aria-current":"page",className:l("font-normal text-foreground",a),...r}));v.displayName="BreadcrumbPage";const N=({children:a,className:r,...s})=>e.jsx("li",{role:"presentation","aria-hidden":"true",className:l("[&>svg]:size-3.5",r),...s,children:a??e.jsx(f,{})});N.displayName="BreadcrumbSeparator";const E={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"},I=["en","es","bn","zh","ja","ko","th","vi","hi","pt","fil","ms","id","my","km","lo"],$=({items:a,className:r=""})=>{const s=k(),{getLocalizedPath:n}=C(),{t:m}=P("navbar"),d=(()=>{if(a)return a.map(t=>({...t,path:n(t.path)}));const o=s.pathname.split("/").filter(Boolean).filter(t=>!I.includes(t)),u=[{name:m("home"),path:n("/")}];let p="";return o.forEach((t,y)=>{if(p+=`/${t}`,t==="story"&&o[y+1])return;const h=E[t],B=h?m(h):t.charAt(0).toUpperCase()+t.slice(1).replace(/-/g," ");u.push({name:B,path:n(p)})}),u})();return d.length<=1?null:e.jsx("nav",{className:`mb-6 ${r}`,"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(v,{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(z,{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{$ as B};