import r from "classnames";
import e, { Component as c } from "react";
import { Trans as i } from "react-i18next";
import { Link as p } from "react-router-dom";
import { ArrowIcon as o, ArrowIconStyles as m } from "./accelbyte-widgets125.mjs";
import f from "./accelbyte-widgets458.mjs";
const g = ({ link: t, children: n, className: a }) => /* @__PURE__ */ e.createElement(p, { className: r(a, "paginationLink"), to: t }, n), E = ({
  callBack: t,
  children: n,
  className: a
}) => /* @__PURE__ */ e.createElement(
  "a",
  {
    href: "#",
    className: r(a, "paginationLink", "link", t ? "" : "disabled"),
    onClick: (l) => {
      l.preventDefault(), t && t();
    }
  },
  n
), s = ({
  linkOrCallback: t,
  children: n,
  className: a
}) => t === !1 ? null : /* @__PURE__ */ e.createElement(e.Fragment, null, typeof t == "string" && /* @__PURE__ */ e.createElement(g, { link: t, className: a }, n), typeof t != "string" && /* @__PURE__ */ e.createElement(E, { callBack: t, className: a }, n));
class y extends c {
  render() {
    return /* @__PURE__ */ e.createElement("div", { className: r(f.pagination, "pagination") }, /* @__PURE__ */ e.createElement(s, { linkOrCallback: this.props.prev, className: "link-prev" }, /* @__PURE__ */ e.createElement(o, { className: r(m.left, "arrowSize") }), /* @__PURE__ */ e.createElement(i, { i18nKey: "Pagination.prev" }, "Prev")), /* @__PURE__ */ e.createElement(s, { linkOrCallback: this.props.next, className: "link-next" }, /* @__PURE__ */ e.createElement(i, { i18nKey: "Pagination.next" }, "Next"), /* @__PURE__ */ e.createElement(o, { className: r(m.right, "arrowSize") })));
  }
}
export {
  y as Pagination
};
