import{gf as h,j as e,Q as t,a$ as d,dD as l,x as p,aQ as m,u as j,gg as u}from"./index-ea7817a2.js";import{H as g}from"./LoadMore-dfb61caa.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(d,{})}):e.jsxs(t,{flexDirection:"column",overflow:"auto",my:"20px",width:"100%",alignItems:"center",children:[a&&e.jsx(l,{size:"lg",mb:"20px"}),!x&&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(g,{onLoadMore:c})]})})},y=({docType:s,component:a})=>{const{id:o}=j(),r=u(s,o);return e.jsx(D,{component:a,...r})};export{y as default};
