import{d as B,u as P,p as I,o as N,bV as k,e as r,f as m,g,j as i,w as l,a5 as d,ax as _,i as w,X as h,aC as C,h as y,v as V,k as D,t as E,c7 as S,a7 as $,m as z}from"./index-bWjSJxiX.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="42f85b24-6e8f-4d2b-9deb-c82811e5b92c",n._sentryDebugIdIdentifier="sentry-dbid-42f85b24-6e8f-4d2b-9deb-c82811e5b92c")}catch{}})();const M={class:"pagination"},T={class:"pagination__list"},L={key:0,class:"pagination__loading"},v=B({__name:"InfinitePagination",props:{fetchNextPage:{type:Function},hasNextPage:{type:Boolean},fetching:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},manual:{type:Boolean},seeMoreButtonProps:{}},setup(n){const{t}=P(),o=n,a=I(null);function s(){!o.manual&&!o.disabled&&a.value&&S(a.value)&&o.hasNextPage&&!o.fetching&&!o.loading&&typeof o.fetchNextPage<"u"&&o.fetchNextPage()}return N(()=>{s(),document.addEventListener("scroll",s)}),k(()=>{document.removeEventListener("scroll",s)}),(e,f)=>(r(),m("div",M,[g("div",T,[i(_,{name:"fade",group:""},{default:l(()=>[e.loading?(r(),m("div",L,[d(e.$slots,"loading",{},void 0,!0)])):d(e.$slots,"default",{key:1},void 0,!0)]),_:3})]),g("div",{ref_key:"footer",ref:a,class:"pagination__footer"},[i(_,{name:"pagination"},{default:l(()=>[e.hasNextPage&&e.fetching?(r(),w($,{key:0,class:"pagination__loader mt-4"})):h("",!0),e.manual&&e.hasNextPage?d(e.$slots,"see-more-button",{key:1},()=>{var u,c;return[i(C,{class:"mt-4",theme:((u=e.seeMoreButtonProps)==null?void 0:u.buttonTheme)||y(V).DISCRET,reverse:(c=e.seeMoreButtonProps)==null?void 0:c.reverse,onClick:f[0]||(f[0]=j=>{var p;return!!e.hasNextPage&&((p=e.fetchNextPage)==null?void 0:p.call(e))})},{default:l(()=>[D(E(y(t)("see_more")),1)]),_:1},8,["theme","reverse"])]},!0):h("",!0)]),_:3})],512)]))}});function b(n){const t=n;t.__i18n=t.__i18n||[],t.__i18n.push({locale:"",resource:{fr:{see_more:o=>{const{normalize:a}=o;return a(["Voir plus"])}},en:{see_more:o=>{const{normalize:a}=o;return a(["See more"])}}}})}typeof b=="function"&&b(v);const R=z(v,[["__scopeId","data-v-68638384"]]);export{R as I};
//# sourceMappingURL=InfinitePagination-iPrLF-jd.js.map