import { jsx, jsxs } from 'react/jsx-runtime';
import { c as cn } from '../utils-BJnb9o5c.js';
import { useTranslation } from 'react-i18next';
import { B as Button } from '../button-CrEMzWKw.js';
import { C as ChevronLeft } from '../chevron-left-BDoT8E2-.js';
import { E as Ellipsis } from '../ellipsis-lb8Ws6br.js';
import { C as ChevronRight } from '../chevron-right-DQnrO-ek.js';
import 'react';
import '../index-Bo3AAQJp.js';
import '../index-CfriMyrd.js';
import '../index-BtkPdosV.js';
import '../createLucideIcon-C8ycilSN.js';

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

const Pagination = (props) => /* @__PURE__ */ jsx(Pagination$1, { ...props });
const PaginationContent = (props) => /* @__PURE__ */ jsx(PaginationContent$1, { ...props });
const PaginationEllipsis = (props) => /* @__PURE__ */ jsx(PaginationEllipsis$1, { ...props });
const PaginationItem = (props) => /* @__PURE__ */ jsx(PaginationItem$1, { ...props });
const PaginationLink = ({
  className,
  ...props
}) => /* @__PURE__ */ jsx(
  PaginationLink$1,
  {
    className: cn("cursor-pointer aria-disabled:cursor-not-allowed", className),
    ...props
  }
);
const PaginationNext = ({
  className,
  ...props
}) => /* @__PURE__ */ jsx(
  PaginationNext$1,
  {
    className: cn("cursor-pointer aria-disabled:cursor-not-allowed", className),
    ...props
  }
);
const PaginationPrevious = ({
  className,
  ...props
}) => /* @__PURE__ */ jsx(
  PaginationPrevious$1,
  {
    className: cn("cursor-pointer aria-disabled:cursor-not-allowed", className),
    ...props
  }
);

export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
//# sourceMappingURL=Pagination.js.map
