import{gY as x,j as e,q as t,L as d,aN as l,c as p,bv as m,u as j,gZ as u}from"./index-DHiyXWqE.js";import{H as g}from"./LoadMore-PXsMaGPW.js";const f=({data:s,isFetching:a,isLoading:r,hasMore:o,isFetchingMore:n,loadMore:c,component:i})=>{const{hasSearchCriteria:h}=x();return e.jsx(t,{width:"100%",height:"100%",bg:"grayShade3",children:r?e.jsx(t,{my:"20px",width:"100%",height:"100%",children:e.jsx(d,{})}):e.jsxs(t,{flexDirection:"column",overflow:"auto",my:"20px",width:"100%",alignItems:"center",children:[a&&e.jsx(l,{size:"lg",mb:"20px"}),!h&&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"}),o&&!a&&e.jsx(g,{onLoadMore:c})]})})},b=({docType:s,component:a})=>{const{id:r}=j(),o=u(s,r);return e.jsx(f,{component:a,...o})};export{b as default};
