import{s as e}from"./rolldown-runtime-C5c2KzVm.js";import{$P as t}from"./lucide-C4oWPzu4.js";import{p as n}from"./utils-Bs-0X7qI.js";import{r}from"./bundle-mjs-C4g7ASB5.js";import{r as i}from"./button-B-NlEi4h.js";var a=n(),o=e(t(),1),s=r();function c(e){let t=(0,a.c)(33),n,r,c,l,u,d,f,p,m,h;t[0]===e?(n=t[1],r=t[2],c=t[3],l=t[4],u=t[5],d=t[6],f=t[7],p=t[8],m=t[9],h=t[10]):({children:n,loading:u,hasMore:d,threshold:f,onLoadMore:c,className:r,emptyText:p,showEmptyText:m,showLoadingIcon:h,...l}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=c,t[4]=l,t[5]=u,t[6]=d,t[7]=f,t[8]=p,t[9]=m,t[10]=h);let g=u===void 0?!1:u,_=d===void 0?!0:d,v=f===void 0?100:f,y=p===void 0?`没有更多数据了`:p,b=m===void 0?!0:m,x=h===void 0?!0:h,S=(0,o.useRef)(null),C=(0,o.useRef)(null),w=(0,o.useRef)(null),T,E;t[11]!==_||t[12]!==g||t[13]!==c||t[14]!==v?(T=()=>{let e=S.current,t=w.current;if(!(!e||!t||!_||g))return C.current=new IntersectionObserver(e=>{e[0]?.isIntersecting&&c()},{root:null,rootMargin:`${v}px`,threshold:0}),C.current.observe(t),()=>{C.current&&C.current.disconnect()}},E=[_,g,c,v],t[11]=_,t[12]=g,t[13]=c,t[14]=v,t[15]=T,t[16]=E):(T=t[15],E=t[16]),(0,o.useEffect)(T,E);let D;t[17]!==_||t[18]!==g||t[19]!==x?(D=x&&g&&_&&(0,s.jsx)(i,{className:`text-muted-foreground size-6`}),t[17]=_,t[18]=g,t[19]=x,t[20]=D):D=t[20];let O;t[21]!==y||t[22]!==_||t[23]!==b?(O=b&&!_&&(0,s.jsx)(`div`,{className:`text-muted-foreground text-sm`,children:y}),t[21]=y,t[22]=_,t[23]=b,t[24]=O):O=t[24];let k;t[25]!==O||t[26]!==D?(k=(0,s.jsxs)(`div`,{ref:w,className:`flex h-8 w-full items-center justify-center`,children:[D,O]}),t[25]=O,t[26]=D,t[27]=k):k=t[27];let A;return t[28]!==n||t[29]!==r||t[30]!==l||t[31]!==k?(A=(0,s.jsxs)(`div`,{ref:S,className:r,...l,children:[n,k]}),t[28]=n,t[29]=r,t[30]=l,t[31]=k,t[32]=A):A=t[32],A}export{c as t};