import { E as o } from "./Env-92498313.mjs";
import e from "react";
import { Trans as t } from "react-i18next";
import { S as c, t as m } from "./CommonError-b56f12ad.mjs";
const C = (a) => {
  var s;
  const { error: r } = a;
  if (!r)
    return null;
  if (o.isAxiosNetworkError(r))
    return /* @__PURE__ */ e.createElement(t, { i18nKey: "CommonError.networkError" }, "The server cannot be reached. Please try again.");
  if ((o.isAxiosError(r) && r.response && r.response.status) === 504)
    return /* @__PURE__ */ e.createElement(c, { buttonAction: () => window.location.reload() });
  const i = o.extractServiceErrorCode(r) || 0, n = m(i);
  return n ? /* @__PURE__ */ e.createElement(e.Fragment, null, n) : (o.isAxiosError(r) && ((s = r == null ? void 0 : r.response) == null ? void 0 : s.status)) === 403 ? /* @__PURE__ */ e.createElement(t, { i18nKey: "CommonError.playerPortal.forbidden" }, "You cannot access this page. Please go back.") : o.isAxiosServerError(r) ? /* @__PURE__ */ e.createElement(t, { i18nKey: "CommonError.serverError" }, "We are experiencing some technical issues right now. Please try again later.") : /* @__PURE__ */ e.createElement(t, { i18nKey: "CommonError.unknownError" }, "Something went wrong. Please contact support for assistance.");
};
export {
  C
};
