import{aq as z,ar as t,aR as P,aW as d,aU as l,a_ as _,c$ as I,c1 as A,c2 as E,r as p,aQ as N,d0 as U,aX as T,aY as q,q as L}from"./index-ktJf6c6X.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"),H=["slots","slotProps"],O=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:I(e.palette.grey[200],.12)}:{backgroundColor:I(e.palette.grey[600],.12)})})),D=d(W)({width:24,height:16});function Q(e){const{slots:s={},slotProps:n={}}=e,a=P(e,H),r=e;return t.jsx("li",{children:t.jsx(O,l({focusRipple:!0},a,{ownerState:r,children:t.jsx(D,l({as:s.CollapsedIcon,ownerState:r},n.collapsedIcon))}))})}function V(e){return E("MuiBreadcrumbs",e)}const X=A("MuiBreadcrumbs",["root","ol","li","separator"]),Y=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],F=e=>{const{classes:s}=e;return q({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},V,s)},G=d(L,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,s)=>[{[`& .${X.li}`]:s.li},s.root]})({}),J=d("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,s)=>s.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),K=d("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,s)=>s.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Z(e,s,n,a){return e.reduce((r,u,c)=>(c<e.length-1?r=r.concat(u,t.jsx(K,{"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=P(a,Y),[S,k]=p.useState(!1),i=l({},a,{component:c,expanded:S,expandText:y,itemsAfterCollapse:m,itemsBeforeCollapse:f,maxItems:x,separator:B}),g=F(i),w=U({elementType:h.CollapsedIcon,externalSlotProps:v.collapsedIcon,ownerState:i}),R=p.useRef(null),$=o=>{const C=()=>{k(!0);const j=R.current.querySelector("a[href],button,[tabindex]");j&&j.focus()};return f+m>=o.length?o:[...o.slice(0,f),t.jsx(Q,{"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(G,l({ref:n,component:c,color:"text.secondary",className:T(g.root,u),ownerState:i},M,{children:t.jsx(J,{className:g.ol,ref:R,ownerState:i,children:Z(S||x&&b.length<=x?b:$(b),g.separator,B,i)})}))});export{se as B};
