import { N as A } from "./CommonError-0ae83068.mjs";
import { C as B, a as h, ad as L, ab as i, F as G, t as V, L as P, R as H, T as l, i as Z, U as E, V as C, au as D, k as y, l as k, ae as T, H as v, a4 as K } from "./index-162fd1aa.mjs";
import { c as R } from "./reactSlick-cb4a2d39.mjs";
import e, { Component as U } from "react";
import { T as N } from "./Tabs-8498653e.mjs";
import { P as _ } from "./Pagination-a353297b.mjs";
import { w as f } from "./WithPropsGuard-9dd19ecc.mjs";
import { N as b } from "./NavItemPlaceholder-0cfc6c3b.mjs";
import { H as $ } from "./Helmet-ed6d5573.mjs";
import { S as F, e as S } from "./ItemDetailPurchaseAlert-3cdb1ea7.mjs";
import { NavLink as c, Switch as x, Route as p, Redirect as d } from "react-router-dom";
import { A as z, a as W, b as j } from "./AppDetailPage-d989694b.mjs";
import { e as X, f as q } from "./MockVars-1cf2eb0a.mjs";
const I = ({ className: r, color: t = "rgb(var(--od-rgba-text))" }) => /* @__PURE__ */ e.createElement("i", { className: r }, /* @__PURE__ */ e.createElement("svg", { className: "inline", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement("mask", { id: "mask0", "mask-type": "alpha", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "16", height: "16" }, /* @__PURE__ */ e.createElement("rect", { width: "16", height: "16", fill: t })), /* @__PURE__ */ e.createElement("g", { mask: "url(#mask0)" }, /* @__PURE__ */ e.createElement(
  "path",
  {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M13.096 4.80002C13.148 4.80002 13.148 4.85336 13.148 4.85336C13.2 4.96002 13.2 5.01336 13.2 5.06669V12.5334C13.2 13.44 12.524 14.1334 11.64 14.1334H4.36005C3.47605 14.1334 2.80005 13.44 2.80005 12.5334V5.06669V4.85336C2.85205 4.85336 2.85205 4.80002 2.85205 4.80002C2.90405 4.80002 2.90405 4.74669 2.90405 4.74669L4.46405 2.61336C4.56805 2.45336 4.72405 2.40002 4.88005 2.40002H11.12C11.276 2.40002 11.432 2.45336 11.484 2.61336L13.044 4.74669C13.096 4.74669 13.096 4.80002 13.096 4.80002ZM10.8601 3.4667H5.14006L4.36006 4.53337H11.6401L10.8601 3.4667ZM11.64 13.0667H4.36001C4.04801 13.0667 3.84001 12.8534 3.84001 12.5334V5.60002H12.16V12.5334C12.16 12.8534 11.952 13.0667 11.64 13.0667ZM7.99997 9.8667C9.45597 9.8667 10.6 8.69337 10.6 7.20003C10.6 6.88003 10.392 6.6667 10.08 6.6667C9.76797 6.6667 9.55997 6.88003 9.55997 7.20003C9.55997 8.1067 8.88397 8.80003 7.99997 8.80003C7.11597 8.80003 6.43997 8.1067 6.43997 7.20003C6.43997 6.88003 6.23197 6.6667 5.91997 6.6667C5.60797 6.6667 5.39997 6.88003 5.39997 7.20003C5.39997 8.69337 6.54397 9.8667 7.99997 9.8667Z",
    fill: t
  }
)))), w = ({ className: r, color: t = "rgb(var(--od-rgba-text))" }) => /* @__PURE__ */ e.createElement("i", { className: r }, /* @__PURE__ */ e.createElement("svg", { className: "inline", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement("mask", { id: "mask0", "mask-type": "alpha", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "16", height: "16" }, /* @__PURE__ */ e.createElement("rect", { width: "16", height: "16", fill: t })), /* @__PURE__ */ e.createElement("g", { mask: "url(#mask0)" }, /* @__PURE__ */ e.createElement(
  "path",
  {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M6.98768 0.216141C6.6799 0.0933656 6.33086 0.243348 6.20808 0.551135C6.08531 0.858922 6.23529 1.20796 6.54308 1.33074L8.82009 2.23903C9.15065 2.37089 9.15734 2.83638 8.8307 2.97768L7.63763 3.4938C6.71572 3.89262 6.38503 5.03237 6.9503 5.86269L7.23799 6.28528H5.90966C5.55687 5.9615 5.11018 5.7309 4.60424 5.64169C3.19012 5.39235 1.84161 6.33658 1.59226 7.75071L0.724017 12.6747C0.474668 14.0889 1.41891 15.4374 2.83303 15.6867C4.24716 15.9361 5.59567 14.9918 5.84502 13.5777L5.86132 13.4853H10.1388L10.1551 13.5777C10.4044 14.9918 11.753 15.9361 13.1671 15.6867C14.5812 15.4374 15.5254 14.0889 15.2761 12.6747L14.4079 7.7507C14.1585 6.33657 12.81 5.39233 11.3959 5.64168C10.8899 5.73089 10.4432 5.96149 10.0904 6.28528H8.68968L7.94225 5.18739C7.80093 4.9798 7.88361 4.69487 8.11408 4.59516L9.30715 4.07904C10.6137 3.51383 10.5869 1.65187 9.2647 1.12443L6.98768 0.216141ZM13.2261 7.95907C13.0918 7.19762 12.3657 6.68919 11.6042 6.82345C11.2764 6.88125 10.9968 7.04777 10.7938 7.28006L10.6145 7.48528H5.38557L5.20626 7.28006C5.0033 7.04777 4.72368 6.88127 4.39587 6.82346C3.63441 6.6892 2.90829 7.19763 2.77403 7.95909L1.90579 12.8831C1.77152 13.6446 2.27996 14.3707 3.04141 14.505C3.80286 14.6392 4.52898 14.1308 4.66325 13.3693L4.8544 12.2853H11.1457L11.3369 13.3693C11.4711 14.1308 12.1972 14.6392 12.9587 14.505C13.7202 14.3707 14.2286 13.6446 14.0943 12.8831L13.2261 7.95907ZM5.5361 8.36917H4.66943V9.23584H3.80273V10.1025H4.66943V10.9692H5.5361V10.1025H6.40273V9.23584H5.5361V8.36917ZM11.5291 9.77826C11.9433 9.77826 12.2791 9.44248 12.2791 9.02826C12.2791 8.61405 11.9433 8.27826 11.5291 8.27826C11.1148 8.27826 10.7791 8.61405 10.7791 9.02826C10.7791 9.44248 11.1148 9.77826 11.5291 9.77826ZM10.5254 10.4192C10.5254 10.8334 10.1896 11.1692 9.77539 11.1692C9.36118 11.1692 9.02539 10.8334 9.02539 10.4192C9.02539 10.0049 9.36118 9.66916 9.77539 9.66916C10.1896 9.66916 10.5254 10.0049 10.5254 10.4192Z",
    fill: t
  }
)))), M = ({ className: r }) => /* @__PURE__ */ e.createElement("i", { className: r }, /* @__PURE__ */ e.createElement("svg", { className: "inline", width: 16, height: 16, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
  "path",
  {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M8.867.4 14.2 3.067c.733.333 1.133 1 1.133 1.733v6.334c0 .8-.466 1.466-1.133 1.8L8.867 15.6c-.267.134-.534.2-.867.2-.267 0-.6-.066-.867-.2L1.8 12.934c-.733-.334-1.133-1.067-1.133-1.8V4.8c0-.733.4-1.4 1.066-1.733L7.067.4c.6-.266 1.266-.266 1.8 0ZM8 1.467c-.067 0-.2 0-.267.066L2.8 4 8 6.6 13.2 4 8.267 1.533C8.2 1.467 8.133 1.467 8 1.467ZM2.333 11.8A.795.795 0 0 1 2 11.2V5.067l5.333 2.666v6.534l-5-2.467Zm6.334 2.467L13.6 11.8c.267-.133.4-.333.4-.6V5.067L8.667 7.733v6.534Z",
    fill: "#B5B5B5"
  }
), /* @__PURE__ */ e.createElement(
  "mask",
  {
    id: "a",
    style: {
      maskType: "alpha"
    },
    maskUnits: "userSpaceOnUse",
    x: 0,
    y: 0,
    width: 16,
    height: 16
  },
  /* @__PURE__ */ e.createElement(
    "path",
    {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M8.867.4 14.2 3.067c.733.333 1.133 1 1.133 1.733v6.334c0 .8-.466 1.466-1.133 1.8L8.867 15.6c-.267.134-.534.2-.867.2-.267 0-.6-.066-.867-.2L1.8 12.934c-.733-.334-1.133-1.067-1.133-1.8V4.8c0-.733.4-1.4 1.066-1.733L7.067.4c.6-.266 1.266-.266 1.8 0ZM8 1.467c-.067 0-.2 0-.267.066L2.8 4 8 6.6 13.2 4 8.267 1.533C8.2 1.467 8.133 1.467 8 1.467ZM2.333 11.8A.795.795 0 0 1 2 11.2V5.067l5.333 2.666v6.534l-5-2.467Zm6.334 2.467L13.6 11.8c.267-.133.4-.333.4-.6V5.067L8.667 7.733v6.534Z",
      fill: "#fff"
    }
  )
), /* @__PURE__ */ e.createElement("g", { mask: "url(#a)" }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 0h16v16H0V0Z", fill: "#B5B5B5" })))), J = ({ className: r }) => /* @__PURE__ */ e.createElement("i", { className: r }, /* @__PURE__ */ e.createElement("svg", { className: "inline", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement("mask", { id: "mask0", "mask-type": "alpha", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "14", height: "14" }, /* @__PURE__ */ e.createElement("rect", { width: "14", height: "14", fill: "#C4C4C4" })), /* @__PURE__ */ e.createElement("g", { mask: "url(#mask0)" }, /* @__PURE__ */ e.createElement(
  "path",
  {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M13.8291 0.170854C14.057 0.39866 14.057 0.768006 13.8291 0.995812L12.629 2.19593C12.6615 2.21732 12.6923 2.2423 12.7208 2.27085L13.7844 3.3344C14.0691 3.61916 14.0691 4.08084 13.7844 4.3656L11.6573 6.49269C11.3725 6.77745 10.9108 6.77745 10.6261 6.49269L9.47917 5.34579L7.35372 7.47124C7.86426 8.15292 8.16667 8.99949 8.16667 9.91669C8.16667 12.1718 6.3385 14 4.08333 14C1.82817 14 0 12.1718 0 9.91669C0 7.66152 1.82817 5.83335 4.08333 5.83335C5.00052 5.83335 5.84709 6.13575 6.52876 6.64629L13.0042 0.170854C13.232 -0.0569515 13.6013 -0.0569515 13.8291 0.170854ZM10.3041 4.52083L11.1417 5.35838L12.65 3.85L11.8959 3.09581C11.8673 3.06726 11.8423 3.03648 11.8209 3.00403L10.3041 4.52083ZM4.08333 7.00002C2.4725 7.00002 1.16667 8.30585 1.16667 9.91669C1.16667 11.5275 2.4725 12.8334 4.08333 12.8334C5.69416 12.8334 7 11.5275 7 9.91669C7 8.30585 5.69416 7.00002 4.08333 7.00002Z",
    fill: "white"
  }
))));
const Q = ({ numberOfCards: r }) => /* @__PURE__ */ e.createElement(e.Fragment, null, Array.from(Array(r ?? 8).keys()).map((t) => /* @__PURE__ */ e.createElement("div", { className: "storeGridItem", key: t }, /* @__PURE__ */ e.createElement("div", { className: "skeletonContainer" }), /* @__PURE__ */ e.createElement("div", { className: "title w-max" }, /* @__PURE__ */ e.createElement(b, null)), /* @__PURE__ */ e.createElement("div", { className: "paymentOptions -mb-5 w-max" }, /* @__PURE__ */ e.createElement(b, null)))));
class Y extends B {
  constructor(t) {
    super(), this.sdk = t, this.state = {
      isFetching: !1,
      platformItemsList: null,
      currencyMap: null,
      error: null
    };
  }
  getOffset(t) {
    return t ? (t - 1) * this.getLimit() : 0;
  }
  getLimit(t) {
    return t || 16;
  }
  async getItemsByCriteria({
    itemType: t,
    page: a,
    country: n,
    pageSize: s,
    plan: m,
    language: g
  }) {
    try {
      if (this.state.isFetching)
        return;
      await this.setState({
        isFetching: !0,
        platformItemsList: null,
        currencyMap: null,
        error: null
      });
      const o = await this.sdk.Platform.Item().fetchItemsByCriteria({
        queryParams: {
          itemType: t,
          offset: this.getOffset(a),
          limit: this.getLimit(s),
          region: n,
          language: g,
          features: m || void 0
        }
      });
      if (o.error)
        throw o.error;
      await this.setState({
        platformItemsList: o.response.data
      });
    } catch (o) {
      this.setState({ error: o });
    } finally {
      this.setState({ isFetching: !1 });
    }
  }
  getCurrencyMap() {
    const { currencyMap: t } = this.state;
    t || this.sdk.Platform.Currency().getCurrencyMap().then((a) => {
      if (a.error)
        throw a.error;
      this.setState({ currencyMap: a.value });
    }).catch((a) => {
      console.error(a);
    });
  }
}
class O extends e.Component {
  constructor(t) {
    super(t), this.appStoreLogic = new Y(h.getAppState().getSdk()), this.appStoreLogic.subscribe(() => this.setState({}));
  }
  componentDidMount() {
    const { page: t, pageSize: a, country: n, language: s } = this.props;
    this.appStoreLogic.getItemsByCriteria({ page: t, pageSize: a, country: n, language: s, itemType: L.enum.OPTIONBOX }), this.appStoreLogic.getCurrencyMap();
  }
  renderOptionboxItems() {
    const { platformItemsList: t, currencyMap: a } = this.appStoreLogic.state;
    return /* @__PURE__ */ e.createElement("div", { className: "optionboxList" }, !a && /* @__PURE__ */ e.createElement(Q, { numberOfCards: t == null ? void 0 : t.data.length }), !!t && a && t.data.map((n) => /* @__PURE__ */ e.createElement(F, { key: n.itemId, item: n, currencyMap: a })));
  }
  renderOptionboxPagination() {
    const { platformItemsList: t } = this.appStoreLogic.state;
    if (!t)
      return;
    const { paging: a } = t, n = !!(a != null && a.next), s = !!(a != null && a.previous), m = this.props.page;
    return /* @__PURE__ */ e.createElement("div", { className: "pagination" }, /* @__PURE__ */ e.createElement(
      _,
      {
        next: n && i.OptionboxList.withSearchParams({
          page: m + 1
        }),
        prev: s && i.OptionboxList.withSearchParams({
          page: m - 1
        })
      }
    ));
  }
  render() {
    const { error: t, isFetching: a, platformItemsList: n } = this.appStoreLogic.state;
    return /* @__PURE__ */ e.createElement("div", { className: "storeContainer" }, /* @__PURE__ */ e.createElement($, null, /* @__PURE__ */ e.createElement("title", null, G.makeTitleWithAppName(V("OptionboxStore.title")))), a && /* @__PURE__ */ e.createElement(P, { className: H.medium }, /* @__PURE__ */ e.createElement(l, { i18nKey: "OptionboxStore.loading" }, "Loading optionbox...")), !a && t && /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(Z, { error: t })), !a && n && this.renderOptionboxItems(), !a && n && this.renderOptionboxPagination());
  }
}
const ee = f(O, (r, t) => r.country !== t.country);
f(
  ({ page: r, pageSize: t, language: a }) => {
    const n = h.getAppState().getUser(), s = n && n.country || void 0;
    return /* @__PURE__ */ e.createElement(ee, { page: r, pageSize: t, country: s, language: a });
  },
  (r, t) => t.page !== r.page || t.language !== r.language
);
const te = e.lazy(() => import("./AppStore-0a8cd466.mjs")), ae = e.lazy(() => import("./BundleStore-f9ec88f8.mjs")), re = e.lazy(() => import("./CodeStore-39396f85.mjs")), ne = () => /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement(c, { className: "tab", to: i.GameList.makePath() }, /* @__PURE__ */ e.createElement(w, { className: "m-2" }), /* @__PURE__ */ e.createElement(l, { i18nKey: "StorePage.tabs.apps" }, "Games")), /* @__PURE__ */ e.createElement(c, { className: "tab", to: i.BundleList.makePath() }, /* @__PURE__ */ e.createElement(I, { className: "m-2" }), /* @__PURE__ */ e.createElement(l, { i18nKey: "StorePage.tabs.bundles" }, "Bundles")), /* @__PURE__ */ e.createElement(c, { className: "tab", to: i.CodeList.makePath() }, /* @__PURE__ */ e.createElement(J, { className: "m-2" }), /* @__PURE__ */ e.createElement(l, { i18nKey: "StorePage.tabs.productKeys" }, "Product Keys")), /* @__PURE__ */ e.createElement(c, { className: "tab", to: i.OptionboxList.makePath() }, /* @__PURE__ */ e.createElement(M, { className: "m-2" }), /* @__PURE__ */ e.createElement(l, { i18nKey: "StorePage.tabs.optionbox" }, "Optionbox"))), /* @__PURE__ */ e.createElement("div", { className: "gridContainer" }, /* @__PURE__ */ e.createElement(
  e.Suspense,
  {
    fallback: /* @__PURE__ */ e.createElement(P, { className: "gridContainerLoading" }, /* @__PURE__ */ e.createElement(l, { i18nKey: "InitialUserFetchPage.notice" }))
  },
  /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement(
    p,
    {
      key: "AppStoreContainer",
      exact: !0,
      path: i.GameList.link,
      render: (r) => {
        const t = Number(E.silentSearchParamsBuilder(r.location.search).get("page")), a = !Number.isNaN(t) && t >= 1;
        if (!a)
          return /* @__PURE__ */ e.createElement(d, { to: i.GameList.withSearchParams({ page: 1 }) });
        const n = E.silentSearchParamsBuilder(r.location.search).get("plan") || void 0;
        return a && /* @__PURE__ */ e.createElement(te, { page: t, language: C(), plan: n });
      }
    }
  ), /* @__PURE__ */ e.createElement(
    p,
    {
      key: "BundleStoreContainer",
      exact: !0,
      path: i.BundleList.link,
      render: (r) => {
        const t = Number(E.silentSearchParamsBuilder(r.location.search).get("page")), a = !Number.isNaN(t) && t >= 1;
        return a ? a && /* @__PURE__ */ e.createElement(ae, { page: t, language: C() }) : /* @__PURE__ */ e.createElement(d, { to: i.BundleList.withSearchParams({ page: 1 }) });
      }
    }
  ), /* @__PURE__ */ e.createElement(
    p,
    {
      key: "CodeStoreContainer",
      exact: !0,
      path: i.CodeList.link,
      render: (r) => {
        const t = Number(E.silentSearchParamsBuilder(r.location.search).get("page")), a = !Number.isNaN(t) && t >= 1;
        return a ? a && /* @__PURE__ */ e.createElement(re, { page: t, language: C() }) : /* @__PURE__ */ e.createElement(d, { to: i.CodeList.withSearchParams({ page: 1 }) });
      }
    }
  ), /* @__PURE__ */ e.createElement(
    p,
    {
      key: "OptionboxStoreContainer",
      exact: !0,
      path: i.OptionboxList.link,
      render: (r) => {
        const t = Number(E.silentSearchParamsBuilder(r.location.search).get("page")), a = !Number.isNaN(t) && t >= 1;
        return a ? a && /* @__PURE__ */ e.createElement(O, { page: t, language: C() }) : /* @__PURE__ */ e.createElement(d, { to: i.OptionboxList.withSearchParams({ page: 1 }) });
      }
    }
  ), /* @__PURE__ */ e.createElement(d, { to: i.GameList.makePath() }))
)));
class ie extends U {
  constructor(t) {
    super(t), this.logic = new z(t), this.logic.subscribe(() => this.setState({}));
  }
  componentDidMount() {
    this.props.isPreviewMode || this.logic.init();
  }
  render() {
    const { language: t, path: a } = this.props, { appItem: n, isFetching: s, error: m } = this.logic.state, g = this.props.isPreviewMode, o = g ? a : "", u = g ? X : n;
    return s ? /* @__PURE__ */ e.createElement(W, null) : m ? /* @__PURE__ */ e.createElement(j, { error: m }) : /* @__PURE__ */ e.createElement("div", { className: "pb-6" }, /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement(c, { className: `tab ${g ? "active" : ""}`, to: i.DlcList.makePath() }, /* @__PURE__ */ e.createElement(w, { className: "icon" }), /* @__PURE__ */ e.createElement(l, { i18nKey: "AppDetailPage.dlcStore.heading" }, "Expansions")), /* @__PURE__ */ e.createElement(c, { className: "tab", to: i.BundleList.makePath() }, /* @__PURE__ */ e.createElement(I, { className: "icon" }), /* @__PURE__ */ e.createElement(l, { i18nKey: "AppDetailPage.inAppStore.heading" }, "Game Store")), /* @__PURE__ */ e.createElement(c, { className: "tab", to: i.OptionboxList.makePath() }, /* @__PURE__ */ e.createElement(M, { className: "m-2" }), /* @__PURE__ */ e.createElement(l, { i18nKey: "StorePage.tabs.optionbox" }, "Optionbox"))), /* @__PURE__ */ e.createElement("div", { className: "gridContainer" }, /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement(
      p,
      {
        key: "AppStoreContainer",
        exact: !0,
        path: `${o}${i.DlcList.link}`,
        render: () => u ? /* @__PURE__ */ e.createElement(
          S,
          {
            baseItem: u,
            itemType: L.enum.APP,
            appType: D.enum.DLC,
            language: t,
            noItemMessage: /* @__PURE__ */ e.createElement(l, { i18nKey: "AppDetailPage.inAppStore.noItem" }, "Looks like there aren`t any items for this game yet."),
            isPreviewMode: g
          }
        ) : /* @__PURE__ */ e.createElement(e.Fragment, null)
      }
    ), /* @__PURE__ */ e.createElement(
      p,
      {
        key: "BundleStoreContainer",
        exact: !0,
        path: `${o}${i.BundleList.link}`,
        render: () => u ? /* @__PURE__ */ e.createElement(
          S,
          {
            baseItem: u,
            itemType: L.enum.INGAMEITEM,
            language: t,
            noItemMessage: /* @__PURE__ */ e.createElement(l, { i18nKey: "AppDetailPage.inAppStore.noItem" }, "Looks like there aren`t any items for this game yet.")
          }
        ) : /* @__PURE__ */ e.createElement(e.Fragment, null)
      }
    ), /* @__PURE__ */ e.createElement(
      p,
      {
        key: "OptionboxStoreContainer",
        exact: !0,
        path: `${o}${i.OptionboxList.link}`,
        render: () => u ? /* @__PURE__ */ e.createElement(
          S,
          {
            baseItem: u,
            itemType: L.enum.OPTIONBOX,
            language: t,
            noItemMessage: /* @__PURE__ */ e.createElement(l, { i18nKey: "AppDetailPage.inAppStore.noItem" }, "Looks like there aren`t any items for this game yet.")
          }
        ) : /* @__PURE__ */ e.createElement(e.Fragment, null)
      }
    ), /* @__PURE__ */ e.createElement(d, { to: `${o}${i.DlcList.link}` }))));
  }
}
const se = f(
  ({ itemId: r, language: t, path: a, isPreviewMode: n }) => {
    const s = h.getAppState().getUser() || void 0, m = s && s.country || void 0;
    return /* @__PURE__ */ e.createElement(ie, { itemId: r, country: m, user: s, language: t, path: a, isPreviewMode: n });
  },
  (r, t) => r.itemId !== t.itemId || r.language !== t.language || r.path !== t.path || r.isPreviewMode !== t.isPreviewMode
), le = "storePage _storePage_636d5", oe = {
  storePage: le
};
class me extends e.Component {
  componentDidMount() {
    y.updateBackground(`url(${k})`);
  }
  componentWillUnmount() {
    y.updateBackground(null);
  }
  render() {
    const { isPreviewMode: t } = this.props, a = t ? t.isSingleGame : h.getAppState().isSingleGame(), n = t ? q : T.getActiveItemId();
    return /* @__PURE__ */ e.createElement("div", { className: "storePageBg", style: v.isDesktopApp() ? void 0 : { backgroundImage: `url(${k})` } }, /* @__PURE__ */ e.createElement("div", { className: R("container mx-auto px-2", oe.storePage) }, /* @__PURE__ */ e.createElement("h2", { className: "storePageTitle" }, /* @__PURE__ */ e.createElement(l, { i18nKey: "StorePageTitle" }, "Store")), !a && /* @__PURE__ */ e.createElement(ne, null), a && /* @__PURE__ */ e.createElement(ce, { itemId: n, path: t == null ? void 0 : t.path })));
  }
}
function ce({ itemId: r, path: t }) {
  if (!r) {
    const a = h.getAppState().getConfig(K.APP_ID).data.value;
    return /* @__PURE__ */ e.createElement(
      A,
      {
        appId: a,
        error: h.getGameState().getGameInfoError(a),
        isWithBackground: !v.isDesktopApp()
      }
    );
  }
  return /* @__PURE__ */ e.createElement(se, { itemId: r, language: C(), path: t, isPreviewMode: !!t });
}
const Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: me
}, Symbol.toStringTag, { value: "Module" }));
export {
  Y as I,
  Q as S,
  Pe as a
};
