'use strict';

var jsxRuntime = require('react/jsx-runtime');
var reactI18next = require('react-i18next');
var utils = require('../utils-BhM0B89p.js');
var button = require('../button-CMl9rLXi.js');
var chevronLeft = require('../chevron-left-BldoOh5p.js');
var ellipsis = require('../ellipsis-4aubOI2n.js');
var chevronRight = require('../chevron-right-0jNdwX2Q.js');
require('react');
require('../index-vioSzJOw.js');
require('../index-DuNgWCXZ.js');
require('../index-D-iDn9RI.js');
require('../createLucideIcon-D0tRgV6l.js');

function Pagination$1({ className, ...props }) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    "nav",
    {
      role: "navigation",
      "aria-label": "pagination",
      "data-slot": "pagination",
      className: utils.cn("mx-auto flex w-full justify-center", className),
      ...props
    }
  );
}
function PaginationContent$1({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    "ul",
    {
      "data-slot": "pagination-content",
      className: utils.cn("flex items-center gap-0.5", className),
      ...props
    }
  );
}
function PaginationItem$1({ ...props }) {
  return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-slot": "pagination-item", ...props });
}
function PaginationLink$1({
  className,
  isActive,
  size = "icon",
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    button.Button,
    {
      asChild: true,
      variant: isActive ? "outline" : "ghost",
      size,
      className: utils.cn(className),
      children: /* @__PURE__ */ jsxRuntime.jsx(
        "a",
        {
          "aria-current": isActive ? "page" : void 0,
          "data-slot": "pagination-link",
          "data-active": isActive,
          ...props
        }
      )
    }
  );
}
function PaginationPrevious$1({
  className,
  text: textProp,
  ...props
}) {
  const { t } = reactI18next.useTranslation();
  const text = textProp ?? t("neetoatoms.pagination.previous", "Previous");
  return /* @__PURE__ */ jsxRuntime.jsxs(
    PaginationLink$1,
    {
      "aria-label": t("neetoatoms.pagination.goToPrevious", "Go to previous page"),
      size: "default",
      className: utils.cn("ps-1.5!", className),
      ...props,
      children: [
        /* @__PURE__ */ jsxRuntime.jsx(chevronLeft.ChevronLeft, { "data-icon": "inline-start", className: "rtl:rotate-180" }),
        /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:block", children: text })
      ]
    }
  );
}
function PaginationNext$1({
  className,
  text: textProp,
  ...props
}) {
  const { t } = reactI18next.useTranslation();
  const text = textProp ?? t("neetoatoms.pagination.next", "Next");
  return /* @__PURE__ */ jsxRuntime.jsxs(
    PaginationLink$1,
    {
      "aria-label": t("neetoatoms.pagination.goToNext", "Go to next page"),
      size: "default",
      className: utils.cn("pe-1.5!", className),
      ...props,
      children: [
        /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:block", children: text }),
        /* @__PURE__ */ jsxRuntime.jsx(chevronRight.ChevronRight, { "data-icon": "inline-end", className: "rtl:rotate-180" })
      ]
    }
  );
}
function PaginationEllipsis$1({
  className,
  ...props
}) {
  const { t } = reactI18next.useTranslation();
  return /* @__PURE__ */ jsxRuntime.jsxs(
    "span",
    {
      "aria-hidden": true,
      "data-slot": "pagination-ellipsis",
      className: utils.cn(
        "flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
        className
      ),
      ...props,
      children: [
        /* @__PURE__ */ jsxRuntime.jsx(
          ellipsis.Ellipsis,
          {}
        ),
        /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("neetoatoms.pagination.morePages", "More pages") })
      ]
    }
  );
}

const Pagination = (props) => /* @__PURE__ */ jsxRuntime.jsx(Pagination$1, { ...props });
const PaginationContent = (props) => /* @__PURE__ */ jsxRuntime.jsx(PaginationContent$1, { ...props });
const PaginationEllipsis = (props) => /* @__PURE__ */ jsxRuntime.jsx(PaginationEllipsis$1, { ...props });
const PaginationItem = (props) => /* @__PURE__ */ jsxRuntime.jsx(PaginationItem$1, { ...props });
const PaginationLink = (props) => /* @__PURE__ */ jsxRuntime.jsx(PaginationLink$1, { ...props });
const PaginationNext = (props) => /* @__PURE__ */ jsxRuntime.jsx(PaginationNext$1, { ...props });
const PaginationPrevious = (props) => /* @__PURE__ */ jsxRuntime.jsx(PaginationPrevious$1, { ...props });

exports.Pagination = Pagination;
exports.PaginationContent = PaginationContent;
exports.PaginationEllipsis = PaginationEllipsis;
exports.PaginationItem = PaginationItem;
exports.PaginationLink = PaginationLink;
exports.PaginationNext = PaginationNext;
exports.PaginationPrevious = PaginationPrevious;
//# sourceMappingURL=Pagination.js.map
