import{r as t,j as c,S as g}from"./index-BeH8ha5h.js";const p=e=>t.createElement("svg",{width:37,height:4,viewBox:"0 0 37 4",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("rect",{x:.5,width:36,height:4,rx:2,fill:"#F4F4F4"})),w=({hasMore:e,isLoading:n,rootMargin:s="600px",onLoadMore:r})=>{const[i,f]=t.useState(null),o=t.useRef(r);t.useEffect(()=>{o.current=r},[r]);const l=e&&!n;return t.useEffect(()=>{if(!i||!l)return;const a=new IntersectionObserver(u=>{u.some(x=>x.isIntersecting)&&o.current()},{rootMargin:s});return a.observe(i),()=>a.disconnect()},[i,l,s]),{sentinelRef:f}},m="_listLoader_x6dag_1",v="_loading_x6dag_8",d={listLoader:m,loading:v},S=({isLoading:e,sentinelRef:n,className:s=""})=>c.jsx("div",{ref:n,className:`${d.listLoader} ${e?d.loading:""} ${s}`,"aria-live":"polite","aria-busy":e,children:e&&c.jsx(g,{size:"small"})});export{S as L,p as S,w as u};