import{b as C,j as n,a as $,c as w,a4 as B,R as V,r as y,c5 as S,c6 as W,M as T,a9 as j,I as O,ab as _,ac as A}from"./main.bddc214a.js";const D=C(n("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined");function K(o){const{isCurrent:b,sizeStyle:i,isMenuTrigger:d,isClickable:E,isDisabled:m,onSelected:u,className:k,isMenuItem:f,isLink:e}=o,g=typeof o.children=="function"?o.children({isMenuItem:f}):o.children;if(f)return g;const I=d?{}:{tabIndex:e&&!m?0:void 0,role:e?"link":void 0,"aria-disabled":e?m:void 0,"aria-current":b&&e?"page":void 0,onClick:()=>u==null?void 0:u()};return $("li",{className:w(`inline-flex justify-start items-center relative min-w-0 ${i==null?void 0:i.font}`,d&&"flex-shrink-0",(!E||m)&&"pointer-events-none",!b&&m&&"text-disabled"),children:[n("div",{...I,className:w(k,"px-8 cursor-pointer rounded whitespace-nowrap overflow-hidden",!d&&"py-4 hover:bg-hover",!d&&e&&"focus-visible:ring outline-none"),children:g}),b===!1&&n(D,{size:i==null?void 0:i.icon,className:w(m?"text-disabled":"text-muted")})]})}const P=C(n("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"}),"MoreHorizOutlined"),X=1,q=10;function Q(o){const{size:b="md",children:i,isDisabled:d,className:E,currentIsClickable:m,isNavigation:u}=o,{trans:k}=B(),f=F(b),e=[];V.Children.forEach(i,t=>{V.isValidElement(t)&&e.push(t)});const g=y.exports.useRef(null),I=y.exports.useRef(null),[z,L]=S(e.length),R=y.exports.useCallback(()=>{const t=r=>{const l=I.current;if(!l)return;const s=Array.from(l.children);if(!s.length)return;const h=l.offsetWidth,x=e.length>r;let c=0,a=0,v=q;if(c+=s.shift().offsetWidth,a++,x&&(c+=s.shift().offsetWidth,v--),c>=h&&a--,s.length>0){const M=s.pop();M.style.overflow="visible",c+=M.offsetWidth,c<h&&a++,M.style.overflow=""}for(const M of s.reverse())c+=M.offsetWidth,c<h&&a++;return Math.max(X,Math.min(v,a))};L(function*(){yield e.length;const r=t(e.length);yield r,r<e.length&&r>1&&(yield t(r))})},[I,i,L]);W({ref:g,onResize:R}),T(R,[i]);let p=e;if(e.length>z){const t=e.length-1;p=[n(K,{sizeStyle:f,isMenuTrigger:!0,children:$(j,{selectionMode:"single",selectedValue:t,children:[n(O,{"aria-label":"\u2026",disabled:d,size:f.btn,children:n(P,{})}),n(_,{children:e.map((h,x)=>{const c=t===x;return n(A,{value:x,onSelected:()=>{var a,v;c||(v=(a=h.props).onSelected)==null||v.call(a)},children:y.exports.cloneElement(h,{isMenuItem:!0})},x)})})]})},"menu")];const l=[...e];let s=z;z>1&&(p.unshift(l.shift()),s--),p.push(...l.slice(-s))}const N=p.length-1,H=p.map((t,r)=>{const l=r===N,s=!l||m;return y.exports.cloneElement(t,{key:t.key||r,isCurrent:l,sizeStyle:f,isClickable:s,isDisabled:d,isLink:u&&t.key!=="menu"})});return n(u?"nav":"div",{className:w(E,"min-w-0 w-full"),"aria-label":k({message:"Breadcrumbs"}),ref:g,children:n("ol",{ref:I,className:w("flex justify-start flex-nowrap",f.minHeight),children:H})})}function F(o){switch(o){case"sm":return{font:"text-sm",icon:"sm",btn:"sm",minHeight:"min-h-36"};case"lg":return{font:"text-lg",icon:"md",btn:"md",minHeight:"min-h-42"};case"xl":return{font:"text-xl",icon:"md",btn:"md",minHeight:"min-h-42"};default:return{font:"text-base",icon:"md",btn:"md",minHeight:"min-h-42"}}}const U=C(n("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"}),"EditOutlined");export{Q as B,D as C,U as E,P as M,K as a};
//# sourceMappingURL=Edit.e6c00c2d.js.map
