import{fN as h,j as e,B as t,L as l,be as p,b as d,bu as m,u,fO as j}from"./index-dP1W1_bd.js";import{H as f}from"./LoadMore-D545rYnU.js";const b=({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}=u(),r=j(s,o);return e.jsx(b,{component:a,...r})};export{S as default};
