import { t as H } from "./vendor/react.js";
import { t as S } from "./createLucideIcon.js";
import { t as q } from "./chevron-down.js";
import { t as y } from "./chevron-left.js";
import { t as g } from "./chevron-right.js";
import { t as _ } from "./ellipsis.js";
import { t as B } from "./dist.js";
import { t as c } from "./utils.js";
var J = [["path", {
  d: "m11 17-5-5 5-5",
  key: "13zhaf"
}], ["path", {
  d: "m18 17-5-5 5-5",
  key: "h8a8et"
}]], G = S("chevrons-left", J), K = [["path", {
  d: "m6 17 5-5-5-5",
  key: "xnjwq"
}], ["path", {
  d: "m13 17 5-5-5-5",
  key: "17xmmf"
}]], V = S("chevrons-right", K), t = H(), m = {
  xs: {
    h: "h-[26px]",
    sq: "size-[26px]",
    px: "px-2",
    pxNav: "px-2",
    gap: "gap-1.5",
    text: "text-xs",
    icon: "size-4"
  },
  sm: {
    h: "h-8",
    sq: "size-8",
    px: "px-3",
    pxNav: "px-3",
    gap: "gap-1.5",
    text: "text-sm",
    icon: "size-4"
  },
  md: {
    h: "h-9",
    sq: "size-9",
    px: "px-3.5",
    pxNav: "px-4",
    gap: "gap-2",
    text: "text-sm",
    icon: "size-4"
  },
  lg: {
    h: "h-10",
    sq: "size-10",
    px: "px-4",
    pxNav: "px-6",
    gap: "gap-2",
    text: "text-sm",
    icon: "size-4"
  }
}, Q = {
  primary: "bg-primary text-primary-foreground",
  info: "bg-info text-info-foreground",
  warning: "bg-warning text-warning-foreground",
  success: "bg-success text-success-foreground",
  destructive: "bg-destructive text-destructive-foreground"
}, L = (e) => e === "outlined" ? "border border-border bg-background/60 backdrop-blur-sm text-secondary-foreground hover:bg-muted" : "text-secondary-foreground hover:bg-muted", T = (e) => e === "rounded" ? "rounded-full" : "rounded-xl", X = {
  previous: y,
  next: g,
  first: G,
  last: V
}, Y = {
  previous: "Go to previous page",
  next: "Go to next page",
  first: "Go to first page",
  last: "Go to last page"
}, Z = B("flex items-center justify-center", {
  variants: {
    size: {
      md: "",
      lg: ""
    },
    style: {
      dot: "",
      line: ""
    },
    framed: {
      true: "rounded-full bg-card dark:bg-muted",
      false: ""
    }
  },
  compoundVariants: [
    {
      size: "md",
      style: "dot",
      framed: !0,
      className: "gap-3 p-2"
    },
    {
      size: "md",
      style: "line",
      framed: !0,
      className: "w-40 gap-2 p-2"
    },
    {
      size: "lg",
      style: "dot",
      framed: !0,
      className: "gap-4 p-3"
    },
    {
      size: "lg",
      style: "line",
      framed: !0,
      className: "w-44 gap-3 p-3"
    },
    {
      size: "md",
      style: "dot",
      framed: !1,
      className: "gap-3"
    },
    {
      size: "md",
      style: "line",
      framed: !1,
      className: "w-36 gap-2"
    },
    {
      size: "lg",
      style: "dot",
      framed: !1,
      className: "gap-4"
    },
    {
      size: "lg",
      style: "line",
      framed: !1,
      className: "w-38 gap-3"
    }
  ],
  defaultVariants: {
    size: "md",
    style: "dot",
    framed: !1
  }
}), P = B("shrink-0 rounded-full", {
  variants: {
    size: {
      md: "",
      lg: ""
    },
    style: {
      dot: "",
      line: "min-h-px min-w-px grow basis-0"
    },
    current: {
      true: "bg-primary/10 dark:bg-primary",
      false: "bg-surface-2 dark:bg-muted"
    }
  },
  compoundVariants: [
    {
      size: "md",
      style: "dot",
      className: "size-2"
    },
    {
      size: "lg",
      style: "dot",
      className: "size-2.5"
    },
    {
      size: "md",
      style: "line",
      className: "h-1.5"
    },
    {
      size: "lg",
      style: "line",
      className: "h-2"
    }
  ],
  defaultVariants: {
    size: "md",
    style: "dot",
    current: !1
  }
});
function ee({ className: e, total: i = 3, current: n = 0, variant: s = "dot", size: a = "md", framed: d = !1, onDotClick: r, ...l }) {
  return /* @__PURE__ */ (0, t.jsx)("div", {
    className: c(Z({
      size: a,
      style: s,
      framed: d
    }), e),
    role: "tablist",
    "aria-label": "Pagination dots",
    ...l,
    children: Array.from({ length: i }, (o, x) => /* @__PURE__ */ (0, t.jsx)("button", {
      type: "button",
      role: "tab",
      "aria-selected": x === n,
      "aria-label": `Go to page ${x + 1}`,
      onClick: () => r?.(x),
      className: c(P({
        size: a,
        style: s,
        current: x === n
      }), r && "cursor-pointer transition-colors duration-200 ease-smooth motion-reduce:transition-none", !r && "cursor-default")
    }, x))
  });
}
ee.displayName = "PaginationDots";
function C(e, i, n) {
  if (i <= n * 2 + 5) return Array.from({ length: i }, (l, o) => o + 1);
  const s = Math.max(e - n, 1), a = Math.min(e + n, i), d = s > 2, r = a < i - 1;
  if (!d && r) {
    const l = 3 + 2 * n;
    return [
      ...Array.from({ length: l }, (o, x) => x + 1),
      "ellipsis",
      i
    ];
  }
  if (d && !r) {
    const l = 3 + 2 * n;
    return [
      1,
      "ellipsis",
      ...Array.from({ length: l }, (o, x) => i - l + x + 1)
    ];
  }
  return [
    1,
    "ellipsis",
    ...Array.from({ length: a - s + 1 }, (l, o) => s + o),
    "ellipsis",
    i
  ];
}
var p = "inline-flex items-center justify-center font-medium shrink-0 select-none outline-none transition-[color,background-color,border-color,box-shadow] duration-150 ease-out focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50";
function A({ page: e, isActive: i, size: n, variant: s, shape: a, activeColor: d, onClick: r }) {
  const l = m[n];
  return /* @__PURE__ */ (0, t.jsx)("button", {
    type: "button",
    onClick: r,
    "aria-current": i ? "page" : void 0,
    className: c(p, l.sq, l.text, T(a), i ? Q[d] : L(s)),
    children: e
  });
}
A.displayName = "PageButton";
function I({ size: e, shape: i }) {
  const n = m[e];
  return /* @__PURE__ */ (0, t.jsx)("span", {
    "aria-hidden": !0,
    className: c("inline-flex items-center justify-center text-muted-foreground shrink-0", n.sq, T(i)),
    children: /* @__PURE__ */ (0, t.jsx)(_, { className: n.icon })
  });
}
I.displayName = "EllipsisIndicator";
function u({ direction: e, disabled: i, size: n, variant: s, prevNextStyle: a, text: d, onClick: r }) {
  const l = m[n], o = a === "icon-only", x = e === "previous" ? y : g;
  return /* @__PURE__ */ (0, t.jsxs)("button", {
    type: "button",
    onClick: r,
    disabled: i,
    "aria-label": e === "previous" ? "Go to previous page" : "Go to next page",
    className: c(p, "rounded-xl", o ? l.sq : [
      l.h,
      l.pxNav,
      l.gap
    ], l.text, L(s)),
    children: [
      e === "previous" && /* @__PURE__ */ (0, t.jsx)(x, { className: c(l.icon, "rtl:rotate-180") }),
      !o && /* @__PURE__ */ (0, t.jsx)("span", { children: d }),
      e === "next" && /* @__PURE__ */ (0, t.jsx)(x, { className: c(l.icon, "rtl:rotate-180") })
    ]
  });
}
u.displayName = "NavButton";
function f({ direction: e, disabled: i, size: n, onClick: s, className: a }) {
  const d = m[n], r = X[e];
  return /* @__PURE__ */ (0, t.jsx)("button", {
    type: "button",
    onClick: s,
    disabled: i,
    "aria-label": Y[e],
    className: c(p, "rounded-xl text-secondary-foreground hover:bg-muted", d.sq, a),
    children: /* @__PURE__ */ (0, t.jsx)(r, { className: c(d.icon, "rtl:rotate-180") })
  });
}
f.displayName = "IconNavButton";
function k({ currentPage: e, totalPages: i, size: n }) {
  const s = m[n];
  return /* @__PURE__ */ (0, t.jsxs)("span", {
    className: c("text-muted-foreground whitespace-nowrap", s.text),
    children: [
      "Page ",
      /* @__PURE__ */ (0, t.jsx)("span", {
        className: "text-foreground",
        children: e
      }),
      " of",
      " ",
      /* @__PURE__ */ (0, t.jsx)("span", {
        className: "text-foreground",
        children: i
      })
    ]
  });
}
k.displayName = "PageInfo";
function j({ currentPage: e, totalPages: i, siblingCount: n, size: s, variant: a, shape: d, activeColor: r, onPageChange: l }) {
  return /* @__PURE__ */ (0, t.jsx)(t.Fragment, { children: C(e, i, n).map((o, x) => o === "ellipsis" ? /* @__PURE__ */ (0, t.jsx)(I, {
    size: s,
    shape: d
  }, `ellipsis-${x}`) : /* @__PURE__ */ (0, t.jsx)(A, {
    page: o,
    isActive: o === e,
    size: s,
    variant: a,
    shape: d,
    activeColor: r,
    onClick: () => l(o)
  }, o)) });
}
function D({ currentPage: e, totalPages: i, siblingCount: n, size: s, variant: a, shape: d, prevNextStyle: r, activeColor: l, previousText: o, nextText: x, onPageChange: b, showPageNumbers: h }) {
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex items-center gap-1",
    children: [
      /* @__PURE__ */ (0, t.jsx)(u, {
        direction: "previous",
        disabled: e <= 1,
        size: s,
        variant: a,
        prevNextStyle: r,
        text: o,
        onClick: () => b(e - 1)
      }),
      h && /* @__PURE__ */ (0, t.jsx)(j, {
        currentPage: e,
        totalPages: i,
        siblingCount: n,
        size: s,
        variant: a,
        shape: d,
        activeColor: l,
        onPageChange: b
      }),
      /* @__PURE__ */ (0, t.jsx)(u, {
        direction: "next",
        disabled: e >= i,
        size: s,
        variant: a,
        prevNextStyle: r,
        text: x,
        onClick: () => b(e + 1)
      })
    ]
  });
}
function te({ currentPage: e, totalPages: i, size: n, variant: s, previousText: a, nextText: d, onPageChange: r }) {
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex w-full items-center justify-between",
    children: [/* @__PURE__ */ (0, t.jsx)(u, {
      direction: "previous",
      disabled: e <= 1,
      size: n,
      variant: s,
      prevNextStyle: "icon-text",
      text: a,
      onClick: () => r(e - 1)
    }), /* @__PURE__ */ (0, t.jsx)(u, {
      direction: "next",
      disabled: e >= i,
      size: n,
      variant: s,
      prevNextStyle: "icon-text",
      text: d,
      onClick: () => r(e + 1)
    })]
  });
}
function se({ currentPage: e, totalPages: i, siblingCount: n, size: s, shape: a, activeColor: d, previousText: r, nextText: l, onPageChange: o, showPageNumbers: x }) {
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex items-start gap-1.5",
    children: [
      /* @__PURE__ */ (0, t.jsx)(u, {
        direction: "previous",
        disabled: e <= 1,
        size: s,
        variant: "outlined",
        prevNextStyle: "icon-text",
        text: r,
        onClick: () => o(e - 1)
      }),
      x && /* @__PURE__ */ (0, t.jsx)(j, {
        currentPage: e,
        totalPages: i,
        siblingCount: n,
        size: s,
        variant: "outlined",
        shape: a,
        activeColor: d,
        onPageChange: o
      }),
      /* @__PURE__ */ (0, t.jsx)(u, {
        direction: "next",
        disabled: e >= i,
        size: s,
        variant: "outlined",
        prevNextStyle: "icon-text",
        text: l,
        onClick: () => o(e + 1)
      })
    ]
  });
}
function ie({ currentPage: e, totalPages: i, siblingCount: n, size: s, onPageChange: a }) {
  const d = C(e, i, n), r = m[s], l = c(p, "border-y border-l border-input", r.sq, r.text);
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "inline-flex items-start",
    children: [
      /* @__PURE__ */ (0, t.jsx)("button", {
        type: "button",
        onClick: () => a(e - 1),
        disabled: e <= 1,
        "aria-label": "Go to previous page",
        className: c(l, "rounded-l-lg text-secondary-foreground hover:bg-muted"),
        children: /* @__PURE__ */ (0, t.jsx)(y, { className: c(r.icon, "rtl:rotate-180") })
      }),
      d.map((o, x) => /* @__PURE__ */ (0, t.jsx)("button", {
        type: "button",
        onClick: () => o !== "ellipsis" && a(o),
        disabled: o === "ellipsis",
        "aria-current": o === e ? "page" : void 0,
        "aria-label": o === "ellipsis" ? "More pages" : `Go to page ${o}`,
        className: c(l, o === e ? "bg-accent text-accent-foreground" : "text-foreground hover:bg-muted", o === "ellipsis" && "pointer-events-none"),
        children: o === "ellipsis" ? /* @__PURE__ */ (0, t.jsx)(_, { className: r.icon }) : o
      }, o === "ellipsis" ? `ellipsis-${x}` : o)),
      /* @__PURE__ */ (0, t.jsx)("button", {
        type: "button",
        onClick: () => a(e + 1),
        disabled: e >= i,
        "aria-label": "Go to next page",
        className: c(l, "rounded-r-lg border-r text-secondary-foreground hover:bg-muted"),
        children: /* @__PURE__ */ (0, t.jsx)(g, { className: c(r.icon, "rtl:rotate-180") })
      })
    ]
  });
}
function re({ currentPage: e, totalPages: i, size: n, onPageChange: s }) {
  const a = m[n], d = c(p, "border-y border-l border-border", a.sq);
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "inline-flex items-start",
    children: [
      /* @__PURE__ */ (0, t.jsx)("button", {
        type: "button",
        onClick: () => s(e - 1),
        disabled: e <= 1,
        "aria-label": "Go to previous page",
        className: c(d, "rounded-l-md text-secondary-foreground hover:bg-muted"),
        children: /* @__PURE__ */ (0, t.jsx)(y, { className: c(a.icon, "rtl:rotate-180") })
      }),
      /* @__PURE__ */ (0, t.jsxs)("div", {
        className: c("inline-flex items-center justify-center border-y border-l border-input", a.h, "px-4", a.text, "font-medium text-foreground"),
        children: [/* @__PURE__ */ (0, t.jsx)("span", { children: e }), /* @__PURE__ */ (0, t.jsxs)("span", {
          className: "text-muted-foreground",
          children: ["/", i]
        })]
      }),
      /* @__PURE__ */ (0, t.jsx)("button", {
        type: "button",
        onClick: () => s(e + 1),
        disabled: e >= i,
        "aria-label": "Go to next page",
        className: c(d, "rounded-r-md border-r text-secondary-foreground hover:bg-muted"),
        children: /* @__PURE__ */ (0, t.jsx)(g, { className: c(a.icon, "rtl:rotate-180") })
      })
    ]
  });
}
function ne({ currentPage: e, totalPages: i, siblingCount: n, size: s, shape: a, activeColor: d, onPageChange: r, showPageNumbers: l }) {
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex items-center gap-1.5",
    children: [
      /* @__PURE__ */ (0, t.jsx)(f, {
        direction: "previous",
        disabled: e <= 1,
        size: s,
        onClick: () => r(e - 1)
      }),
      l && /* @__PURE__ */ (0, t.jsx)(j, {
        currentPage: e,
        totalPages: i,
        siblingCount: n,
        size: s,
        variant: "default",
        shape: a,
        activeColor: d,
        onPageChange: r
      }),
      /* @__PURE__ */ (0, t.jsx)(f, {
        direction: "next",
        disabled: e >= i,
        size: s,
        onClick: () => r(e + 1)
      })
    ]
  });
}
function oe({ currentPage: e, totalPages: i, siblingCount: n, size: s, shape: a, activeColor: d, onPageChange: r, showPageNumbers: l }) {
  const o = m[s];
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex items-center gap-1.5",
    children: [
      /* @__PURE__ */ (0, t.jsxs)("button", {
        type: "button",
        onClick: () => r(1),
        disabled: e <= 1,
        className: c(p, "rounded-md text-secondary-foreground hover:bg-muted", o.h, o.pxNav, o.gap, o.text),
        children: [/* @__PURE__ */ (0, t.jsx)(G, { className: c(o.icon, "rtl:rotate-180") }), /* @__PURE__ */ (0, t.jsx)("span", { children: "First" })]
      }),
      /* @__PURE__ */ (0, t.jsx)(f, {
        direction: "previous",
        disabled: e <= 1,
        size: s,
        onClick: () => r(e - 1)
      }),
      l && /* @__PURE__ */ (0, t.jsx)(j, {
        currentPage: e,
        totalPages: i,
        siblingCount: n,
        size: s,
        variant: "default",
        shape: a,
        activeColor: d,
        onPageChange: r
      }),
      /* @__PURE__ */ (0, t.jsx)(f, {
        direction: "next",
        disabled: e >= i,
        size: s,
        onClick: () => r(e + 1)
      }),
      /* @__PURE__ */ (0, t.jsxs)("button", {
        type: "button",
        onClick: () => r(i),
        disabled: e >= i,
        className: c(p, "rounded-md text-secondary-foreground hover:bg-muted", o.h, o.pxNav, o.gap, o.text),
        children: [/* @__PURE__ */ (0, t.jsx)("span", { children: "Last" }), /* @__PURE__ */ (0, t.jsx)(V, { className: c(o.icon, "rtl:rotate-180") })]
      })
    ]
  });
}
function ae({ currentPage: e, totalPages: i, siblingCount: n, size: s, shape: a, activeColor: d, previousText: r, nextText: l, onPageChange: o, showPageNumbers: x }) {
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex w-full items-center justify-between",
    children: [/* @__PURE__ */ (0, t.jsx)(k, {
      currentPage: e,
      totalPages: i,
      size: s
    }), /* @__PURE__ */ (0, t.jsxs)("div", {
      className: "flex items-center gap-1",
      children: [
        /* @__PURE__ */ (0, t.jsx)(u, {
          direction: "previous",
          disabled: e <= 1,
          size: s,
          variant: "default",
          prevNextStyle: "icon-text",
          text: r,
          onClick: () => o(e - 1)
        }),
        x && /* @__PURE__ */ (0, t.jsx)(j, {
          currentPage: e,
          totalPages: i,
          siblingCount: n,
          size: s,
          variant: "default",
          shape: a,
          activeColor: d,
          onPageChange: o
        }),
        /* @__PURE__ */ (0, t.jsx)(u, {
          direction: "next",
          disabled: e >= i,
          size: s,
          variant: "default",
          prevNextStyle: "icon-text",
          text: l,
          onClick: () => o(e + 1)
        })
      ]
    })]
  });
}
function le({ currentPage: e, totalPages: i, size: n, onPageChange: s }) {
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex items-center gap-1",
    children: [
      /* @__PURE__ */ (0, t.jsx)(f, {
        direction: "previous",
        disabled: e <= 1,
        size: n,
        onClick: () => s(e - 1)
      }),
      /* @__PURE__ */ (0, t.jsx)(k, {
        currentPage: e,
        totalPages: i,
        size: n
      }),
      /* @__PURE__ */ (0, t.jsx)(f, {
        direction: "next",
        disabled: e >= i,
        size: n,
        onClick: () => s(e + 1)
      })
    ]
  });
}
function de({ currentPage: e, totalPages: i, siblingCount: n, size: s, shape: a, activeColor: d, previousText: r, onPageChange: l, showPageNumbers: o, itemsPerPage: x, perPageOptions: b, onPerPageChange: h }) {
  const N = m[s];
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex items-center gap-1.5",
    children: [
      /* @__PURE__ */ (0, t.jsx)(k, {
        currentPage: e,
        totalPages: i,
        size: s
      }),
      /* @__PURE__ */ (0, t.jsx)(u, {
        direction: "previous",
        disabled: e <= 1,
        size: s,
        variant: "default",
        prevNextStyle: "icon-text",
        text: r,
        onClick: () => l(e - 1)
      }),
      o && /* @__PURE__ */ (0, t.jsx)(j, {
        currentPage: e,
        totalPages: i,
        siblingCount: n,
        size: s,
        variant: "default",
        shape: a,
        activeColor: d,
        onPageChange: l
      }),
      h && /* @__PURE__ */ (0, t.jsxs)("div", {
        className: c("relative inline-flex items-center justify-center rounded-md border border-border font-medium", N.h, "px-4", N.gap, N.text, "text-foreground"),
        children: [
          /* @__PURE__ */ (0, t.jsx)("select", {
            value: x,
            onChange: (v) => h(Number(v.target.value)),
            className: "absolute inset-0 cursor-pointer opacity-0",
            "aria-label": "Items per page",
            children: (b ?? [
              10,
              20,
              50
            ]).map((v) => /* @__PURE__ */ (0, t.jsxs)("option", {
              value: v,
              children: [v, "/page"]
            }, v))
          }),
          /* @__PURE__ */ (0, t.jsxs)("span", { children: [x ?? 10, "/page"] }),
          /* @__PURE__ */ (0, t.jsx)(q, { className: N.icon })
        ]
      })
    ]
  });
}
function ce({ currentPage: e, totalPages: i, size: n, onPageChange: s }) {
  const a = m[n];
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex items-center gap-1",
    children: [
      /* @__PURE__ */ (0, t.jsx)(f, {
        direction: "previous",
        disabled: e <= 1,
        size: n,
        onClick: () => s(e - 1)
      }),
      /* @__PURE__ */ (0, t.jsxs)("div", {
        className: c("relative inline-flex items-center justify-center rounded-xl border border-border font-medium", a.h, "px-4", a.gap, a.text, "text-foreground"),
        children: [
          /* @__PURE__ */ (0, t.jsx)("select", {
            value: e,
            onChange: (d) => s(Number(d.target.value)),
            className: "absolute inset-0 cursor-pointer opacity-0",
            "aria-label": "Select page",
            children: Array.from({ length: i }, (d, r) => /* @__PURE__ */ (0, t.jsxs)("option", {
              value: r + 1,
              children: ["Page ", r + 1]
            }, r + 1))
          }),
          /* @__PURE__ */ (0, t.jsxs)("span", { children: ["Page ", e] }),
          /* @__PURE__ */ (0, t.jsx)(q, { className: a.icon })
        ]
      }),
      /* @__PURE__ */ (0, t.jsx)(f, {
        direction: "next",
        disabled: e >= i,
        size: n,
        onClick: () => s(e + 1)
      })
    ]
  });
}
function xe({ currentPage: e, totalPages: i, siblingCount: n, size: s, onPageChange: a }) {
  const d = C(e, i, n), r = m[s];
  return /* @__PURE__ */ (0, t.jsx)("div", {
    className: "flex items-start gap-1",
    children: d.map((l, o) => l === "ellipsis" ? /* @__PURE__ */ (0, t.jsx)(I, {
      size: s,
      shape: "square"
    }, `ellipsis-${o}`) : /* @__PURE__ */ (0, t.jsx)("button", {
      type: "button",
      onClick: () => a(l),
      "aria-current": l === e ? "page" : void 0,
      className: c(p, r.sq, r.text, l === e ? "border-b-2 border-foreground text-foreground" : "text-foreground hover:bg-muted"),
      children: l
    }, l))
  });
}
function ue({ currentPage: e, totalPages: i, size: n, previousText: s, nextText: a, onPageChange: d }) {
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "flex items-center gap-1",
    children: [/* @__PURE__ */ (0, t.jsx)(u, {
      direction: "previous",
      disabled: e <= 1,
      size: n,
      variant: "outlined",
      prevNextStyle: "icon-text",
      text: s,
      onClick: () => d(e - 1)
    }), /* @__PURE__ */ (0, t.jsx)(u, {
      direction: "next",
      disabled: e >= i,
      size: n,
      variant: "outlined",
      prevNextStyle: "icon-text",
      text: a,
      onClick: () => d(e + 1)
    })]
  });
}
function me({ currentPage: e, totalPages: i, size: n, previousText: s, nextText: a, onPageChange: d }) {
  const r = m[n];
  return /* @__PURE__ */ (0, t.jsxs)("div", {
    className: "inline-flex items-center",
    children: [/* @__PURE__ */ (0, t.jsx)("button", {
      type: "button",
      onClick: () => d(e - 1),
      disabled: e <= 1,
      className: c(p, "rounded-l-md border border-border bg-background text-foreground hover:bg-muted", r.h, r.pxNav, r.gap, r.text),
      children: s
    }), /* @__PURE__ */ (0, t.jsx)("button", {
      type: "button",
      onClick: () => d(e + 1),
      disabled: e >= i,
      className: c(p, "rounded-r-md border border-l-0 border-border bg-primary/10 text-foreground hover:bg-muted", r.h, r.pxNav, r.gap, r.text),
      children: a
    })]
  });
}
function pe(e) {
  switch (e) {
    case "page-default":
      return {
        resolvedType: "default",
        card: !1
      };
    case "page-minimal":
      return {
        resolvedType: "outline",
        card: !1,
        overrideVariant: "outlined"
      };
    case "card-default":
      return {
        resolvedType: "default",
        card: !0,
        overrideVariant: "outlined"
      };
    case "card-minimal":
      return {
        resolvedType: "page-number",
        card: !0
      };
    case "card-button-group":
      return {
        resolvedType: "combine",
        card: !1
      };
    default:
      return {
        resolvedType: e,
        card: !1
      };
  }
}
var fe = {
  default: D,
  "previous-next": te,
  "with-buttons": se,
  combine: ie,
  "combine-steps": re,
  minimal: ne,
  "first-last": oe,
  "page-number": ae,
  "left-right-chevron": le,
  "page-dropdown": de,
  "page-dropdown-nav": ce,
  "with-underline": xe,
  outline: ue,
  "box-style": me
};
function be({ className: e, type: i = "default", size: n = "md", variant: s = "default", shape: a = "square", prevNextStyle: d = "icon-text", currentPage: r = 1, totalPages: l = 10, siblingCount: o = 1, onPageChange: x, showPageNumbers: b = !0, previousText: h = "Previous", nextText: N = "Next", itemsPerPage: v, perPageOptions: M, onPerPageChange: $, activeColor: E = "primary", ...R }) {
  const { resolvedType: z, card: F, overrideVariant: O } = pe(i), W = {
    currentPage: r,
    totalPages: l,
    siblingCount: o,
    size: n,
    variant: O ?? s,
    shape: a === "circle" ? "rounded" : a,
    prevNextStyle: d,
    activeColor: E,
    previousText: h,
    nextText: N,
    onPageChange: (w) => {
      w >= 1 && w <= l && x && x(w);
    },
    showPageNumbers: b,
    itemsPerPage: v,
    perPageOptions: M,
    onPerPageChange: $
  }, U = fe[z] ?? D;
  return /* @__PURE__ */ (0, t.jsx)("nav", {
    "aria-label": "pagination",
    "data-slot": "pagination",
    className: c("flex w-full", F && "rounded-xl border border-border bg-background p-4 dark:border-border dark:bg-muted", e),
    ...R,
    children: /* @__PURE__ */ (0, t.jsx)(U, { ...W })
  });
}
be.displayName = "Pagination";
export {
  be as t
};

//# sourceMappingURL=Pagination.js.map