import{fc as x,j as e,d as t,L as h,dt as l,y as p,b2 as m,u as j,fd as u}from"./index-CK33qGU_.js";import{H as f}from"./LoadMore-Dc94HdUG.js";const g=({data:s,isFetching:a,isLoading:o,hasMore:r,isFetchingMore:n,loadMore:c,component:i})=>{const{searchText:d}=x();return e.jsx(t,{width:"100%",height:"100%",bg:"grayShade3",children:o?e.jsx(t,{my:"20px",width:"100%",height:"100%",children:e.jsx(h,{})}):e.jsxs(t,{flexDirection:"column",overflow:"auto",my:"20px",width:"100%",alignItems:"center",children:[a&&e.jsx(l,{size:"lg",mb:"20px"}),!d&&s.length>0&&e.jsx(p,{pb:"8px",children:"Result from previous search"}),e.jsx(i,{data:s}),n&&e.jsx(m,{fontSize:"40px",color:"black"}),r&&!a&&e.jsx(f,{onLoadMore:c})]})})},S=({docType:s,component:a})=>{const{id:o}=j(),r=u(s,o);return e.jsx(g,{component:a,...r})};export{S as default};
