1import{j as e}from"./jsx-runtime-b15e31e8.js";import{r as x}from"./visitmonaco_js-ffcebadd.js";import{t as b}from"./bundle-mjs-e6c91357.js";import{I as p}from"./index-9a465153.js";const k=({items:a,className:h})=>{const[c,m]=x.useState(!1),o=x.useRef(null);x.useEffect(()=>{const r=t=>{o.current&&!o.current.contains(t.target)&&m(!1)};return c&&document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[c]);const i=(r,t)=>e.jsx("span",{className:`${t?"text-deep-black":"group-hover:text-deep-black"}`,title:r,children:r}),d=(r,t,l,s)=>e.jsxs("div",{className:"flex items-center text-[14px] leading-[18px] text-[#949494] group transition-colors duration-300",children:[r.href?e.jsxs("a",{href:r.href,className:"flex items-center hover:text-deep-black",children:[s&&e.jsx(p,{color:"#949494",className:"ltr:mr-1 rtl:ml-1 group-hover:text-deep-black",name:"home",size:"14"}),i(r.name,l)]}):e.jsxs("div",{className:"flex items-center",children:[s&&e.jsx(p,{color:"#949494",className:"ltr:mr-1 rtl:ml-1",name:"home",size:"14"}),i(r.name,l)]}),!l&&e.jsx("span",{className:"mx-[5px]",children:"/"})]},`breadcrumb-${t}`),u=()=>{if(a.length<=2)return e.jsx("div",{className:"flex items-center",children:a.map((s,n)=>d(s,n,n===a.length-1,n===0))});const r=a[0],t=a[a.length-1],l=a.slice(1,-1);return e.jsxs("div",{className:"flex items-center relative",ref:o,children:[d(r,0,!1,!0),e.jsx("button",{onClick:()=>m(!c),className:"flex items-center text-[14px] leading-[18px] text-[#949494] hover:text-deep-black transition-colors duration-300 px-1","aria-label":"Show full breadcrumb path",children:e.jsx("span",{className:"mx-[5px]",children:"..."})}),e.jsx("span",{className:"mx-[5px] text-[#949494]",children:"/"}),e.jsx("div",{className:"flex items-center text-[14px] leading-[18px] text-deep-black truncate max-w-[180px]",children:e.jsx("span",{title:t.name,className:"truncate",children:t.name})}),c&&l.length>0&&e.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white shadow-lg rounded-md border border-gray-200 py-2 z-50 min-w-[200px]",children:l.map((s,n)=>e.jsx("div",{children:s.href?e.jsx("a",{href:s.href,className:"block px-4 py-2 text-[14px] text-[#949494] hover:bg-gray-100 hover:text-deep-black transition-colors",children:s.name}):e.jsx("div",{className:"block px-4 py-2 text-[14px] text-[#949494]",children:s.name})},`dropdown-${n}`))})]})},f=()=>e.jsx("div",{className:"flex items-center flex-wrap",children:a.map((r,t)=>{const l=t===a.length-1;return d(r,t,l,t===0)})});return e.jsxs("nav",{"data-testid":"breadcrumbs","aria-label":"breadcrumbs",className:b("",h),children:[e.jsx("div",{className:"md:hidden",children:u()}),e.jsx("div",{className:"hidden md:block",children:f()})]})};export{k as Breadcrumbs,k as default}; 2//# sourceMappingURL=Breadcrumbs-44494357.js.map
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.