"use strict";exports.id=4943,exports.ids=[4943],exports.modules={16145:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(20997),r=a(13153),i=a(34483),d=a(89699),l=a.n(d),o=a(57987),m=a(60802),c=a(84353),g=e([o]);o=(g.then?(await g)():g)[0];let TermsItem=({term:e})=>{let{t}=(0,o.useTranslation)(),a=(0,c.t)({description:e?.description});return(0,n.jsxs)("div",{className:"order-list-enable mb-8 last:mb-0 lg:mb-10",children:[n.jsx("h3",{className:"mb-4 text-sm font-medium text-dark dark:text-light lg:mb-5",children:t(e?.title)}),a?n.jsx("div",{className:"space-y-5 leading-6 react-editor-description",dangerouslySetInnerHTML:{__html:a}}):""]})},__WEBPACK_DEFAULT_EXPORT__=({isLoading:e,hasMore:t,isLoadingMore:a,terms:s,loadMore:d})=>{let{t:c}=(0,o.useTranslation)();return n.jsx(n.Fragment,{children:e?n.jsx("div",{className:"py-32",children:n.jsx(i.wY,{showText:!1})}):l()(s)?n.jsx("div",{className:"py-32",children:n.jsx(r.Z,{title:"No terms and conditions found \uD83D\uDE14",message:""})}):(0,n.jsxs)(n.Fragment,{children:[s?.map(e=>n.jsx(TermsItem,{term:e},e?.id)),t&&n.jsx("div",{className:"mt-8 grid place-content-center md:mt-10",children:n.jsx(m.Z,{onClick:d,disabled:a,isLoading:a,children:c("text-loadmore")})})]})})};s()}catch(e){s(e)}})},51935:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{U:()=>useTermsAndConditions});var n=a(54574),r=a(77649),i=a(79849),d=a(11163),l=a(61175),o=e([n,i]);function useTermsAndConditions(e){let{locale:t}=(0,d.useRouter)(),a={...e,language:t},{data:s,isLoading:o,error:m,fetchNextPage:c,hasNextPage:g,isFetching:u,isFetchingNextPage:h}=(0,l.useInfiniteQuery)([r.P.TERMS_AND_CONDITIONS,a],({queryKey:e,pageParam:t})=>n.Z.termsAndConditions.all(Object.assign({},e[1],t)),{getNextPageParam:({current_page:e,last_page:t})=>t>e&&{page:e+1}});return{termsAndConditions:s?.pages?.flatMap(e=>e.data)??[],paginatorInfo:Array.isArray(s?.pages)?(0,i.Q)(s?.pages[s.pages.length-1]):null,isLoading:o,error:m,isFetching:u,isLoadingMore:h,loadMore:function(){c()},hasMore:!!g}}[n,i]=o.then?(await o)():o,s()}catch(e){s(e)}})},79849:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{Q:()=>mapPaginatorData});var n=a(65338),r=e([n]);n=(r.then?(await r)():r)[0];let mapPaginatorData=e=>{if(!e)return null;let{data:t,...a}=(0,n.default)(e);return{...a,hasMorePages:a.lastPage!==a.currentPage,firstItem:a.from,lastItem:a.to}};s()}catch(e){s(e)}})}};