import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,t as n}from"./jsx-runtime-CiQ1k8xo.js";import{lt as r}from"./vscode-api-DjORcpSo.js";import{t as i}from"./spinner-BAEL5-Nn.js";var a=r(),o=e(t(),1),s=n();function c(e){let t=(0,a.c)(12),{hasNextPage:n,isFetchingNextPage:r,onLoadNextPage:c}=e,u=(0,o.useRef)(null),d;t[0]!==n||t[1]!==r||t[2]!==c?(d=()=>{n&&!r&&c()},t[0]=n,t[1]=r,t[2]=c,t[3]=d):d=t[3];let f=(0,o.useEffectEvent)(d),p;t[4]!==n||t[5]!==r||t[6]!==f?(p=()=>{let e=u.current;if(e==null||!n||r)return;if(typeof IntersectionObserver>`u`){f();return}let t=new IntersectionObserver(e=>{e.some(l)&&(t.disconnect(),f())});return t.observe(e),()=>{t.disconnect()}},t[4]=n,t[5]=r,t[6]=f,t[7]=p):p=t[7];let m;if(t[8]!==n||t[9]!==r?(m=[n,r],t[8]=n,t[9]=r,t[10]=m):m=t[10],(0,o.useEffect)(p,m),!n&&!r)return null;let h;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,s.jsx)(`div`,{ref:u,className:`flex justify-center py-3`,children:(0,s.jsx)(i,{className:`icon-xs text-token-text-secondary`})}),t[11]=h):h=t[11],h}function l(e){return e.isIntersecting}export{c as t};
//# sourceMappingURL=infinite-scroll-pagination-spinner-3qjc5cYh.js.map