"use client";
'use strict';

const jsxRuntime = require('react/jsx-runtime');
const button = require('../../../../../../../ui/src/components/button.cjs');
const LucideIcons = require('lucide-react');

function Pagination({
  total,
  showing,
  hasMore,
  isLoadingMore,
  onLoadMore,
  labels = {}
}) {
  const {
    showing: showingLabel = "Showing {count} of {total}",
    next = "Load More"
  } = labels;
  const showingText = showingLabel.replace("{count}", String(showing)).replace("{total}", String(total));
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-4", children: [
    /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: showingText }),
    hasMore && /* @__PURE__ */ jsxRuntime.jsxs(
      button.Button,
      {
        variant: "outline",
        size: "sm",
        onClick: onLoadMore,
        disabled: isLoadingMore,
        children: [
          isLoadingMore ? "Loading..." : next,
          /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronRight, { className: "ml-2 h-4 w-4" })
        ]
      }
    )
  ] });
}

exports.Pagination = Pagination;
