import i from "classnames";
import t, { Component as f } from "react";
import { Trans as s } from "react-i18next";
import { A as m, a as l } from "./ArrowIcon-afdb4626.mjs";
import { L as p } from "./index-35107a02.mjs";
const E = "pagination _pagination_706ed", u = {
  pagination: E
}, d = ({ link: e, children: a, className: n }) => /* @__PURE__ */ t.createElement(p, { className: i(n, "paginationLink"), to: e }, a), _ = ({
  callBack: e,
  children: a,
  className: n
}) => /* @__PURE__ */ t.createElement(
  "a",
  {
    href: "#",
    className: i(n, "paginationLink", "link", e ? "" : "disabled"),
    onClick: (r) => {
      r.preventDefault(), e && e();
    }
  },
  a
), c = ({
  linkOrCallback: e,
  children: a,
  className: n
}) => e === !1 ? null : /* @__PURE__ */ t.createElement(t.Fragment, null, typeof e == "string" && /* @__PURE__ */ t.createElement(d, { link: e, className: n }, a), typeof e != "string" && /* @__PURE__ */ t.createElement(_, { callBack: e, className: n }, a));
class x extends f {
  render() {
    return /* @__PURE__ */ t.createElement("div", { className: i(u.pagination, "pagination") }, /* @__PURE__ */ t.createElement(c, { linkOrCallback: this.props.prev, className: "link-prev" }, /* @__PURE__ */ t.createElement(m, { className: i(l.left, "arrowSize") }), /* @__PURE__ */ t.createElement(s, { i18nKey: "Pagination.prev" }, "Prev")), /* @__PURE__ */ t.createElement(c, { linkOrCallback: this.props.next, className: "link-next" }, /* @__PURE__ */ t.createElement(s, { i18nKey: "Pagination.next" }, "Next"), /* @__PURE__ */ t.createElement(m, { className: i(l.right, "arrowSize") })));
  }
}
const y = ({ children: e, isExternal: a = !1, to: n, isDisabled: r, ...o }) => {
  if (r)
    return /* @__PURE__ */ t.createElement("div", null, e);
  if (a) {
    const g = n.toString();
    return /* @__PURE__ */ t.createElement("a", { href: g, ...o }, e);
  }
  return /* @__PURE__ */ t.createElement(p, { to: n, ...o }, e);
};
export {
  y as E,
  x as P
};
