import e from "react";
import { Trans as a } from "react-i18next";
import "./accelbyte-widgets401.mjs";
const r = class extends e.Component {
  constructor(t) {
    super(t), this.state = {
      open: !1
    };
  }
  renderReadMoreButton() {
    return this.state.open ? /* @__PURE__ */ e.createElement(
      "a",
      {
        onClick: (t) => {
          t.preventDefault(), this.setState({ open: !1 });
        },
        href: "#"
      },
      /* @__PURE__ */ e.createElement(a, { i18nKey: "CatalogOverview.readless" }, "Read less")
    ) : /* @__PURE__ */ e.createElement(
      "a",
      {
        onClick: (t) => {
          t.preventDefault(), this.setState({ open: !0 });
        },
        href: "#"
      },
      /* @__PURE__ */ e.createElement(a, { i18nKey: "CatalogOverview.readmore" }, "Read more")
    );
  }
  render() {
    const { item: t } = this.props, n = t.longDescription || "", o = (n || "").length > r.maxContentLength;
    return /* @__PURE__ */ e.createElement("section", { className: "catalogOverview" }, /* @__PURE__ */ e.createElement("h2", { className: "overviewHeading" }, /* @__PURE__ */ e.createElement(a, { i18nKey: "CatalogOverview.heading" }, "Overview")), /* @__PURE__ */ e.createElement("div", { className: "overviewContent" }, this.state.open ? n : n.slice(0, r.maxContentLength), !n && /* @__PURE__ */ e.createElement("span", null, /* @__PURE__ */ e.createElement(a, { i18nKey: "CatalogOverview.noContent" }, "No Overview")), /* @__PURE__ */ e.createElement("div", null, o && this.renderReadMoreButton())));
  }
};
let s = r;
s.maxContentLength = 643;
export {
  s as default
};
