import{aa as j,j as a,O as d,P as x,B as l,U as m,c as t,r as c}from"./index-Dbk1Plmn.js";import{C as h}from"./chevron-right-L2MnFoxW.js";/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const u=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],g=j("ChevronLeft",u),N=({className:e,...s})=>a.jsx("nav",{role:"navigation","aria-label":"Pagination",className:t("mx-auto flex w-full justify-center",e),...s});N.displayName="Pagination";const P=c.forwardRef(({className:e,...s},n)=>a.jsx("ul",{ref:n,className:t("flex flex-row items-center gap-1",e),...s}));P.displayName="PaginationContent";const f=c.forwardRef(({className:e,...s},n)=>a.jsx("li",{ref:n,className:t("",e),...s}));f.displayName="PaginationItem";const v=c.forwardRef(({className:e,size:s="sm",variant:n="outline",children:i,...o},r)=>a.jsxs(l,{ref:r,"aria-label":"Go to previous page",variant:n,size:s,className:t("gap-1",e),...o,children:[a.jsx(g,{className:"h-4 w-4"}),s==="icon"?i:i??a.jsx("span",{className:"hidden sm:inline",children:"Previous"})]}));v.displayName="PaginationPrevious";const w=c.forwardRef(({className:e,size:s="sm",variant:n="outline",children:i,...o},r)=>a.jsxs(l,{ref:r,"aria-label":"Go to next page",variant:n,size:s,className:t("gap-1",e),...o,children:[s==="icon"?i:i??a.jsx("span",{className:"hidden sm:inline",children:"Next"}),a.jsx(h,{className:"h-4 w-4"})]}));w.displayName="PaginationNext";function C({offset:e,limit:s,total:n,onPageChange:i,className:o}){const r=Math.floor(e/s)+1,p=Math.max(1,Math.ceil(n/s));return a.jsxs("div",{className:t("flex items-center justify-between",o),children:[a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",e+1,"–",Math.min(e+s,n)," of ",n.toLocaleString()]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(d,{children:[a.jsx(x,{asChild:!0,children:a.jsx("span",{children:a.jsx(l,{variant:"outline",size:"sm",disabled:e===0,onClick:()=>i(Math.max(0,e-s)),children:a.jsx(g,{className:"h-4 w-4"})})})}),a.jsx(m,{children:"Previous page"})]}),a.jsxs("span",{className:"text-sm text-muted-foreground",children:[r," / ",p]}),a.jsxs(d,{children:[a.jsx(x,{asChild:!0,children:a.jsx("span",{children:a.jsx(l,{variant:"outline",size:"sm",disabled:e+s>=n,onClick:()=>i(e+s),children:a.jsx(h,{className:"h-4 w-4"})})})}),a.jsx(m,{children:"Next page"})]})]})]})}C.displayName="OffsetPagination";export{C as O,N as P,P as a,f as b,v as c,w as d};
