import{d as $,b as B,o as a,c as t,g as f,w as k,b5 as d,h as l,l as p,bB as b,N as h,j as v,F as N,p as I,n as M,cI as z,t as F,az as P}from"./Co0rzPff.js";const L={key:0,class:"flex items-center gap-1"},S=["href"],V={key:0},j=["href","onClick"],D=["onClick"],E=["href"],R=$({__name:"Pagination",props:{page:{default:1},count:{default:1},linkFunction:{type:Function,default:y=>{}}},emits:["switch-page"],setup(y,{emit:m}){const w=m,g=y,c=B(()=>{const e=[],n=g.count,i=g.page,r=i-1,u=i+1,C="-";return r>1&&e.push(1),r>2&&e.push(C),r>=1&&e.push(r),e.push(i),u<=n&&e.push(u),ue.count>1?(a(),t("div",L,[e.page>1?(a(),f(h,{key:0,circular:"",type:"transparent"},{default:k(()=>[e.linkFunction?(a(),t("a",{key:0,"aria-label":"Previous Page",href:e.linkFunction(e.page-1),onClick:s[0]||(s[0]=d(n=>o(e.page-1),["prevent"]))},[l(p(b))],8,S)):(a(),t("button",{key:1,"aria-label":"Previous Page",onClick:s[1]||(s[1]=n=>o(e.page-1))},[l(p(b))]))]),_:1})):v("",!0),(a(!0),t(N,null,I(c.value,(n,i)=>(a(),t("div",{key:"page-"+n+"-"+i,class:M([{"page-number":e.page!==n,shrink:n!=="-"&&n>99},"page-number-container"])},[n==="-"?(a(),t("div",V,[l(p(z))])):(a(),f(h,{key:1,circular:"",color:e.page===n?"brand":"standard",type:e.page===n?"standard":"transparent"},{default:k(()=>[e.linkFunction?(a(),t("a",{key:0,href:e.linkFunction(n),onClick:d(r=>e.page!==n?o(n):null,["prevent"])},F(n),9,j)):(a(),t("button",{key:1,onClick:r=>e.page!==n?o(n):null},F(n),9,D))]),_:2},1032,["color","type"]))],2))),128)),e.page!==c.value[c.value.length-1]?(a(),f(h,{key:1,circular:"",type:"transparent"},{default:k(()=>[e.linkFunction?(a(),t("a",{key:0,"aria-label":"Next Page",href:e.linkFunction(e.page+1),onClick:s[2]||(s[2]=d(n=>o(e.page+1),["prevent"]))},[l(p(P))],8,E)):(a(),t("button",{key:1,"aria-label":"Next Page",onClick:s[3]||(s[3]=n=>o(e.page+1))},[l(p(P))]))]),_:1})):v("",!0)])):v("",!0)}});export{R as _};