import{j as s}from"./vendor-radix-DNp60FuA.js";import{a as h,b as a}from"./index-BXV3Jf6T.js";function w({currentPage:e,totalPages:t,onPageChange:d,maxVisiblePages:l=5}){if(t<=1)return null;const f=(()=>{const i=[];let o,r;t<=l?(o=1,r=t):e<=Math.ceil(l/2)?(o=1,r=l):e>=t-Math.floor(l/2)?(o=t-l+1,r=t):(o=e-Math.floor(l/2),r=e+Math.floor(l/2));for(let n=o;n<=r;n++)i.push(n);return i})();return s.jsx("div",{className:"flex justify-center mt-8",children:s.jsxs("nav",{className:"inline-flex items-center gap-1 bg-white/5 backdrop-blur-sm border border-white/10 rounded-full px-2 py-1.5",children:[s.jsx("button",{onClick:()=>e>1&&d(e-1),disabled:e<=1,className:`flex items-center justify-center size-9 rounded-full transition-all duration-300 ${e<=1?"text-slate-600 cursor-not-allowed":"text-slate-400 hover:bg-white/10 hover:text-white"}`,"aria-label":"Previous page",children:s.jsx(h,{className:"size-5"})}),f.map(i=>s.jsx("button",{onClick:()=>d(i),className:`flex items-center justify-center size-9 rounded-full text-sm font-medium transition-all duration-300 ${e===i?"bg-primary text-white shadow-lg shadow-primary/25":"text-slate-400 hover:bg-white/10 hover:text-white"}`,"aria-label":`Page ${i}`,"aria-current":e===i?"page":void 0,children:i},i)),s.jsx("button",{onClick:()=>e<t&&d(e+1),disabled:e>=t,className:`flex items-center justify-center size-9 rounded-full transition-all duration-300 ${e>=t?"text-slate-600 cursor-not-allowed":"text-slate-400 hover:bg-white/10 hover:text-white"}`,"aria-label":"Next page",children:s.jsx(a,{className:"size-5"})})]})})}export{w as P};