import { c as classNames } from "./reactSlick.js";
import React__default, { Component } from "react";
import { Link } from "react-router-dom";
import { A as ArrowIcon, e as ArrowIconStyles, T as Trans } from "./index.js";
const pagination = "pagination _pagination_e7419";
var styles = {
  pagination
};
const PaginationLinkWithString = ({ link, children, className }) => /* @__PURE__ */ React__default.createElement(Link, {
  className: classNames(className, "paginationLink"),
  to: link
}, children);
const PaginationLinkWithCallback = ({
  callBack,
  children,
  className
}) => /* @__PURE__ */ React__default.createElement("a", {
  href: "#",
  className: classNames(className, "paginationLink", "link", !callBack ? "disabled" : ""),
  onClick: (event) => {
    event.preventDefault();
    if (callBack)
      callBack();
  }
}, children);
const PaginationLink = ({
  linkOrCallback,
  children,
  className
}) => {
  if (linkOrCallback === false)
    return null;
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, typeof linkOrCallback === "string" && /* @__PURE__ */ React__default.createElement(PaginationLinkWithString, {
    link: linkOrCallback,
    className
  }, children), typeof linkOrCallback !== "string" && /* @__PURE__ */ React__default.createElement(PaginationLinkWithCallback, {
    callBack: linkOrCallback,
    className
  }, children));
};
class Pagination extends Component {
  render() {
    return /* @__PURE__ */ React__default.createElement("div", {
      className: classNames(styles.pagination, "pagination")
    }, /* @__PURE__ */ React__default.createElement(PaginationLink, {
      linkOrCallback: this.props.prev,
      className: "link-prev"
    }, /* @__PURE__ */ React__default.createElement(ArrowIcon, {
      className: classNames(ArrowIconStyles.left, "arrowSize")
    }), /* @__PURE__ */ React__default.createElement(Trans, {
      i18nKey: "Pagination.prev"
    }, "Previous")), /* @__PURE__ */ React__default.createElement(PaginationLink, {
      linkOrCallback: this.props.next,
      className: "link-next"
    }, /* @__PURE__ */ React__default.createElement(Trans, {
      i18nKey: "Pagination.next"
    }, "Next"), /* @__PURE__ */ React__default.createElement(ArrowIcon, {
      className: classNames(ArrowIconStyles.right, "arrowSize")
    })));
  }
}
export { Pagination as P };
