"use strict";exports.id=2792,exports.ids=[2792],exports.modules={86763:(e,t,r)=>{r.d(t,{z:()=>Provider});var s=r(16689),i=r.n(s),a=r(86878);(0,s.createContext)(void 0);let Provider=({children:e,itemsPerPage:t,onChange:r,shouldResetInfiniteScroll:n,...l})=>{let u=(0,a.X)();return(0,s.useEffect)(()=>a.X.subscribe(()=>{r?.(u.serializedState())}),[r]),(0,s.useEffect)(()=>{let{itemsPerPage:e}=a.X.getState();t&&t!==e&&u.setItemsPerPage(t)},[t]),(0,s.useEffect)(()=>{u.setState(l),n&&u.resetInfiniteScroll(l.page??0)},[l.term,l.sort,l.selectedFacets,l.page]),i().createElement(i().Fragment,null,e)}},91341:(e,t,r)=>{r.d(t,{h:()=>usePagination});var s=r(16689),i=r(72339),a=r(69029);let getLink=e=>{let{pathname:t,search:r}=(0,i.Z)(e);return`${t}${r}`},usePagination=e=>{let{pages:t,itemsPerPage:r,state:i}=(0,a.R)(),n=Math.ceil(e/r),l=Number(t[t.length-1])+1,u=t[0]-1;return(0,s.useMemo)(()=>({next:l<n&&{cursor:l,link:getLink({...i,page:l})},prev:u>-1&&{cursor:u,link:getLink({...i,page:u})}}),[l,u,i,n])}}};