const e=require(`./chunk-BcutgqC9.cjs`),t=require(`./dist-B9QvvA-B.cjs`),n=require(`./dist-C1zbYA0G.cjs`);let r=require(`react`);r=e.n(r,1);let i=require(`react/jsx-runtime`);function a(e){let a=e+`CollectionProvider`,[o,s]=t.a(a),[c,l]=o(a,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:t,children:n}=e,a=r.default.useRef(null),o=r.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:t,itemMap:o,collectionRef:a,children:n})};u.displayName=a;let d=e+`CollectionSlot`,f=n.r(d),p=r.default.forwardRef((e,t)=>{let{scope:r,children:a}=e;return(0,i.jsx)(f,{ref:n.o(t,l(d,r).collectionRef),children:a})});p.displayName=d;let m=e+`CollectionItemSlot`,h=`data-radix-collection-item`,g=n.r(m),_=r.default.forwardRef((e,t)=>{let{scope:a,children:o,...s}=e,c=r.default.useRef(null),u=n.o(t,c),d=l(m,a);return r.default.useEffect(()=>(d.itemMap.set(c,{ref:c,...s}),()=>void d.itemMap.delete(c))),(0,i.jsx)(g,{[h]:``,ref:u,children:o})});_.displayName=m;function v(t){let n=l(e+`CollectionConsumer`,t);return r.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:u,Slot:p,ItemSlot:_},v,s]}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
//# sourceMappingURL=dist-DgPcEpUT.cjs.map