import { BundleIcon as u } from "./accelbyte-widgets379.mjs";
import { GameIcon as g } from "./accelbyte-widgets380.mjs";
import { OptionboxIcon as d } from "./accelbyte-widgets381.mjs";
import { ProductKeyIcon as h } from "./accelbyte-widgets382.mjs";
import { Loading as E } from "./accelbyte-widgets136.mjs";
import { Tabs as b } from "./accelbyte-widgets174.mjs";
import { getCurrentLanguage as l } from "./accelbyte-widgets58.mjs";
import { OptionboxStore as N } from "./accelbyte-widgets383.mjs";
import { EcomPath as a } from "./accelbyte-widgets59.mjs";
import { UrlUtils as o } from "./accelbyte-widgets90.mjs";
import e from "react";
import { Trans as m } from "react-i18next";
import { NavLink as c, Switch as P, Route as s, Redirect as i } from "react-router-dom";
import S from "./accelbyte-widgets384.mjs";
import f from "./accelbyte-widgets385.mjs";
import L from "./accelbyte-widgets386.mjs";
const _ = () => /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(b, null, /* @__PURE__ */ e.createElement(c, { className: "tab", to: a.GameList.makePath() }, /* @__PURE__ */ e.createElement(g, { className: "m-2" }), /* @__PURE__ */ e.createElement(m, { i18nKey: "StorePage.tabs.apps" }, "Games")), /* @__PURE__ */ e.createElement(c, { className: "tab", to: a.BundleList.makePath() }, /* @__PURE__ */ e.createElement(u, { className: "m-2" }), /* @__PURE__ */ e.createElement(m, { i18nKey: "StorePage.tabs.bundles" }, "Bundles")), /* @__PURE__ */ e.createElement(c, { className: "tab", to: a.CodeList.makePath() }, /* @__PURE__ */ e.createElement(h, { className: "m-2" }), /* @__PURE__ */ e.createElement(m, { i18nKey: "StorePage.tabs.productKeys" }, "Product Keys")), /* @__PURE__ */ e.createElement(c, { className: "tab", to: a.OptionboxList.makePath() }, /* @__PURE__ */ e.createElement(d, { className: "m-2" }), /* @__PURE__ */ e.createElement(m, { i18nKey: "StorePage.tabs.optionbox" }, "Optionbox"))), /* @__PURE__ */ e.createElement("div", { className: "gridContainer" }, /* @__PURE__ */ e.createElement(
  e.Suspense,
  {
    fallback: /* @__PURE__ */ e.createElement(E, { className: "gridContainerLoading" }, /* @__PURE__ */ e.createElement(m, { i18nKey: "InitialUserFetchPage.notice" }))
  },
  /* @__PURE__ */ e.createElement(P, null, /* @__PURE__ */ e.createElement(
    s,
    {
      key: "AppStoreContainer",
      exact: !0,
      path: a.GameList.link,
      render: (n) => {
        const t = Number(o.silentSearchParamsBuilder(n.location.search).get("page")), r = !Number.isNaN(t) && t >= 1;
        if (!r)
          return /* @__PURE__ */ e.createElement(i, { to: a.GameList.withSearchParams({ page: 1 }) });
        const p = o.silentSearchParamsBuilder(n.location.search).get("plan") || void 0;
        return r && /* @__PURE__ */ e.createElement(S, { page: t, language: l(), plan: p });
      }
    }
  ), /* @__PURE__ */ e.createElement(
    s,
    {
      key: "BundleStoreContainer",
      exact: !0,
      path: a.BundleList.link,
      render: (n) => {
        const t = Number(o.silentSearchParamsBuilder(n.location.search).get("page")), r = !Number.isNaN(t) && t >= 1;
        return r ? r && /* @__PURE__ */ e.createElement(f, { page: t, language: l() }) : /* @__PURE__ */ e.createElement(i, { to: a.BundleList.withSearchParams({ page: 1 }) });
      }
    }
  ), /* @__PURE__ */ e.createElement(
    s,
    {
      key: "CodeStoreContainer",
      exact: !0,
      path: a.CodeList.link,
      render: (n) => {
        const t = Number(o.silentSearchParamsBuilder(n.location.search).get("page")), r = !Number.isNaN(t) && t >= 1;
        return r ? r && /* @__PURE__ */ e.createElement(L, { page: t, language: l() }) : /* @__PURE__ */ e.createElement(i, { to: a.CodeList.withSearchParams({ page: 1 }) });
      }
    }
  ), /* @__PURE__ */ e.createElement(
    s,
    {
      key: "OptionboxStoreContainer",
      exact: !0,
      path: a.OptionboxList.link,
      render: (n) => {
        const t = Number(o.silentSearchParamsBuilder(n.location.search).get("page")), r = !Number.isNaN(t) && t >= 1;
        return r ? r && /* @__PURE__ */ e.createElement(N, { page: t, language: l() }) : /* @__PURE__ */ e.createElement(i, { to: a.OptionboxList.withSearchParams({ page: 1 }) });
      }
    }
  ), /* @__PURE__ */ e.createElement(i, { to: a.GameList.makePath() }))
)));
export {
  _ as MultipleGameStore
};
