import{fY as h,j as e,a as t,D as l,aN as p,c as d,bm as m,u as j,fZ as u}from"./index-_eM6l4Nf.js";import{H as f}from"./LoadMore-CH7MFfoq.js";const D=({data:s,isFetching:a,isLoading:o,hasMore:r,isFetchingMore:n,loadMore:c,component:i})=>{const{searchText:x}=h();return e.jsx(t,{width:"100%",height:"100%",bg:"grayShade3",children:o?e.jsx(t,{my:"20px",width:"100%",height:"100%",children:e.jsx(l,{})}):e.jsxs(t,{flexDirection:"column",overflow:"auto",my:"20px",width:"100%",alignItems:"center",children:[a&&e.jsx(p,{size:"lg",mb:"20px"}),!x&&s.length>0&&e.jsx(d,{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(D,{component:a,...r})};export{S as default};
