import{a8 as A,a9 as t,aw as I,aB as d,az as l,aF as $,cR as v,bA as E,bz as N,r as p,av as _,cS as T,aC as U,aD as L,s as D}from"./index-BiWH3VAt.js";const H=A(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=["slots","slotProps"],W=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:v(e.palette.grey[200],.12)}:{backgroundColor:v(e.palette.grey[600],.12)})})),q=d(H)({width:24,height:16});function F(e){const{slots:s={},slotProps:n={}}=e,a=I(e,O),r=e;return t.jsx("li",{children:t.jsx(W,l({focusRipple:!0},a,{ownerState:r,children:t.jsx(q,l({as:s.CollapsedIcon,ownerState:r},n.collapsedIcon))}))})}function V(e){return N("MuiBreadcrumbs",e)}const G=E("MuiBreadcrumbs",["root","ol","li","separator"]),J=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],K=e=>{const{classes:s}=e;return L({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},V,s)},Q=d(D,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,s)=>[{[`& .${G.li}`]:s.li},s.root]})({}),X=d("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,s)=>s.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Y=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(Y,{"aria-hidden":!0,className:s,ownerState:a,children:n},`separator-${c}`)):r.push(u),r),[])}const se=p.forwardRef(function(s,n){const a=_({props:s,name:"MuiBreadcrumbs"}),{children:r,className:u,component:c="nav",slots:h={},slotProps:P={},expandText:B="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:f=1,maxItems:x=8,separator:y="/"}=a,w=I(a,J),[S,M]=p.useState(!1),i=l({},a,{component:c,expanded:S,expandText:B,itemsAfterCollapse:m,itemsBeforeCollapse:f,maxItems:x,separator:y}),g=K(i),k=T({elementType:h.CollapsedIcon,externalSlotProps:P.collapsedIcon,ownerState:i}),R=p.useRef(null),z=o=>{const C=()=>{M(!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(F,{"aria-label":B,slots:{CollapsedIcon:h.CollapsedIcon},slotProps:{collapsedIcon:k},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(Q,l({ref:n,component:c,color:"text.secondary",className:U(g.root,u),ownerState:i},w,{children:t.jsx(X,{className:g.ol,ref:R,ownerState:i,children:Z(S||x&&b.length<=x?b:z(b),g.separator,y,i)})}))});export{se as B};
