import { NoMatchingGameError as n } from "./accelbyte-widgets204.mjs";
import { getCurrentLanguage as i } from "./accelbyte-widgets58.mjs";
import { Ctx as o } from "./accelbyte-widgets33.mjs";
import { GameHelper as p } from "./accelbyte-widgets205.mjs";
import { DesktopChecker as l } from "@accelbyte/sdk";
import s from "classnames";
import t from "react";
import { Trans as c } from "react-i18next";
import { MultipleGameStore as g } from "./accelbyte-widgets206.mjs";
import { SingleGameStore as f } from "./accelbyte-widgets207.mjs";
import u from "./accelbyte-widgets208.mjs";
import { mockAppItemId as S } from "./accelbyte-widgets209.mjs";
class y extends t.Component {
  render() {
    const { isPreviewMode: e } = this.props, r = e ? e.isSingleGame : o.getAppState().isSingleGame(), a = e ? S : p.getActiveItemId();
    return /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { className: s("container mx-auto px-2", u.storePage) }, /* @__PURE__ */ t.createElement("h2", { className: "storePageTitle" }, /* @__PURE__ */ t.createElement(c, { i18nKey: "StorePageTitle" }, "Store")), !r && /* @__PURE__ */ t.createElement(g, null), r && /* @__PURE__ */ t.createElement(d, { itemId: a, path: e == null ? void 0 : e.path })));
  }
}
function d({ itemId: m, path: e }) {
  if (!m) {
    const r = o.getAppState().getGameId();
    return /* @__PURE__ */ t.createElement(
      n,
      {
        appId: r,
        error: o.getGameState().getGameInfoError(r),
        isWithBackground: !l.isDesktopApp()
      }
    );
  }
  return /* @__PURE__ */ t.createElement(f, { itemId: m, language: i(), path: e, isPreviewMode: !!e });
}
export {
  y as default
};
