import{j as t,f as p,dh as P,q as $,dU as R,n as z,m as E,T as N,r as i,t as T,v as U,w as A}from"./index-5ae5cc5e.js";import"./index-e5978b8b.js";import{c as q,b as H}from"./Grow-d70e9b6d.js";const L=q(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),O=p(P)($(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:R(e.palette.grey[200],.12)}:{backgroundColor:R(e.palette.grey[600],.12)}}}))),D=p(L)({width:24,height:16});function V(e){const{slots:r={},slotProps:a={},...l}=e,s=e;return t.jsx("li",{children:t.jsx(O,{focusRipple:!0,...l,ownerState:s,children:t.jsx(D,{as:r.CollapsedIcon,ownerState:s,...a.collapsedIcon})})})}function W(e){return E("MuiBreadcrumbs",e)}const F=z("MuiBreadcrumbs",["root","ol","li","separator"]),G=F,J=e=>{const{classes:r}=e;return A({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},W,r)},K=p(N,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${G.li}`]:r.li},r.root]})({}),Q=p("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,r)=>r.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),X=p("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,r)=>r.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Y(e,r,a,l){return e.reduce((s,d,n)=>(n<e.length-1?s=s.concat(d,t.jsx(X,{"aria-hidden":!0,className:r,ownerState:l,children:a},`separator-${n}`)):s.push(d),s),[])}const Z=i.forwardRef(function(r,a){const l=T({props:r,name:"MuiBreadcrumbs"}),{children:s,className:d,component:n="nav",slots:h={},slotProps:j={},expandText:C="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:g=1,maxItems:f=8,separator:y="/",...v}=l,[B,I]=i.useState(!1),c={...l,component:n,expanded:B,expandText:C,itemsAfterCollapse:m,itemsBeforeCollapse:g,maxItems:f,separator:y},u=J(c),M=H({elementType:h.CollapsedIcon,externalSlotProps:j.collapsedIcon,ownerState:c}),S=i.useRef(null),k=o=>{const x=()=>{I(!0);const w=S.current.querySelector("a[href],button,[tabindex]");w&&w.focus()};return g+m>=o.length?o:[...o.slice(0,g),t.jsx(V,{"aria-label":C,slots:{CollapsedIcon:h.CollapsedIcon},slotProps:{collapsedIcon:M},onClick:x},"ellipsis"),...o.slice(o.length-m,o.length)]},b=i.Children.toArray(s).filter(o=>i.isValidElement(o)).map((o,x)=>t.jsx("li",{className:u.li,children:o},`child-${x}`));return t.jsx(K,{ref:a,component:n,color:"textSecondary",className:U(u.root,d),ownerState:c,...v,children:t.jsx(Q,{className:u.ol,ref:S,ownerState:c,children:Y(B||f&&b.length<=f?b:k(b),u.separator,y,c)})})}),oe=Z;export{oe as B};
