import{an as z,ao as t,aP as I,aU as d,aS as l,aY as _,c_ as j,bZ as A,bY as E,r as p,aO as N,c$ as U,aV as T,aW as L,q as O}from"./index-DlNZgIG9.js";const W=z(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"),q=["slots","slotProps"],H=d(_)(({theme:e})=>l({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":l({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":l({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:j(e.palette.grey[200],.12)}:{backgroundColor:j(e.palette.grey[600],.12)})})),V=d(W)({width:24,height:16});function Y(e){const{slots:s={},slotProps:n={}}=e,a=I(e,q),r=e;return t.jsx("li",{children:t.jsx(H,l({focusRipple:!0},a,{ownerState:r,children:t.jsx(V,l({as:s.CollapsedIcon,ownerState:r},n.collapsedIcon))}))})}function D(e){return E("MuiBreadcrumbs",e)}const Z=A("MuiBreadcrumbs",["root","ol","li","separator"]),F=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],G=e=>{const{classes:s}=e;return L({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},D,s)},J=d(O,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,s)=>[{[`& .${Z.li}`]:s.li},s.root]})({}),K=d("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,s)=>s.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Q=d("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,s)=>s.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function X(e,s,n,a){return e.reduce((r,u,c)=>(c<e.length-1?r=r.concat(u,t.jsx(Q,{"aria-hidden":!0,className:s,ownerState:a,children:n},`separator-${c}`)):r.push(u),r),[])}const se=p.forwardRef(function(s,n){const a=N({props:s,name:"MuiBreadcrumbs"}),{children:r,className:u,component:c="nav",slots:h={},slotProps:v={},expandText:y="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:f=1,maxItems:x=8,separator:B="/"}=a,M=I(a,F),[S,k]=p.useState(!1),i=l({},a,{component:c,expanded:S,expandText:y,itemsAfterCollapse:m,itemsBeforeCollapse:f,maxItems:x,separator:B}),g=G(i),w=U({elementType:h.CollapsedIcon,externalSlotProps:v.collapsedIcon,ownerState:i}),R=p.useRef(null),$=o=>{const C=()=>{k(!0);const P=R.current.querySelector("a[href],button,[tabindex]");P&&P.focus()};return f+m>=o.length?o:[...o.slice(0,f),t.jsx(Y,{"aria-label":y,slots:{CollapsedIcon:h.CollapsedIcon},slotProps:{collapsedIcon:w},onClick:C},"ellipsis"),...o.slice(o.length-m,o.length)]},b=p.Children.toArray(r).filter(o=>p.isValidElement(o)).map((o,C)=>t.jsx("li",{className:g.li,children:o},`child-${C}`));return t.jsx(J,l({ref:n,component:c,color:"text.secondary",className:T(g.root,u),ownerState:i},M,{children:t.jsx(K,{className:g.ol,ref:R,ownerState:i,children:X(S||x&&b.length<=x?b:$(b),g.separator,B,i)})}))});export{se as B};
