import{j as r}from"./vendor-react-wBh_31cN.js";import{aq as l,R as c}from"./index-BKr2rJhV.js";import{B as n}from"./BlinkingDots-CJK9OJE3.js";import{A as x}from"./AnimatedLoadingIcon-TR9RzU0m.js";import{H as d}from"./LoadMore-Bg-Y-iGB.js";import{b as f,c as u}from"./useSearchData-GiBvQUG-.js";import{c as h}from"./vendor-router-D1GqFWiT.js";import"./vendor-redux-CJZrIb6x.js";import"./vendor-utils-OeoE2qq_.js";import"./vendor-icons-BUUmD6ht.js";import"./vendor-radix-BRyWS4bQ.js";import"./vendor-grid-CeFlDWv4.js";import"./Search-BDh3P0Yy.js";import"./textarea-Co48BFy3.js";import"./popover-DNRIgB96.js";import"./useDebounce-BiuGz9t2.js";import"./tooltip-Da8-EbK8.js";import"./useProjectId-Ck57b-tn.js";import"./includes-D04d5Ytc.js";import"./concat-AxOj0lUI.js";import"./useLazyInfiniteData-Bv3uuY8D.js";import"./mergeRight-Cv2eiGXV.js";import"./range-BC8I8D3I.js";import"./_isNumber-DRgbAj-F.js";import"./chain-B-C0kF16.js";import"./inc-0XPMXBh9.js";import"./add-DCChD-X4.js";import"./time-utils-tK1noPML.js";import"./addDays-DjM7nKyN.js";import"./always-CtAmwIxm.js";import"./init-BDcDHUTz.js";import"./formatDistance-qDinyJzC.js";const j=({data:o,isFetching:t,isLoading:e,hasMore:s,isFetchingMore:m,loadMore:i,component:a})=>{const{hasSearchCriteria:p}=f();return r.jsx("div",{className:"flex h-full w-full bg-muted",children:e?r.jsx("div",{className:"my-5 flex h-full w-full",children:r.jsx(l,{})}):r.jsxs("div",{className:"my-5 flex w-full flex-col items-center overflow-auto px-5",children:[t&&r.jsx("div",{className:"mb-5",children:r.jsx(x,{size:"lg"})}),!p&&o.length>0&&r.jsx(c,{className:"pb-2",children:"Result from previous search"}),r.jsx(a,{data:o}),m&&r.jsx(n,{className:"text-[40px] text-foreground"}),s&&!t&&r.jsx(d,{onLoadMore:i})]})})},Y=({docType:o,component:t})=>{const{id:e}=h(),s=u(o,e);return r.jsx(j,{component:t,...s})};export{Y as default};
