"use strict";const o=require("./Env-a6f11491.js"),e=require("react"),n=require("react-i18next"),a=require("./CommonError-3e91e7d2.js");const E=i=>{var s;const{error:r}=i;if(!r)return null;if(o.ErrorHelper.isAxiosNetworkError(r))return e.createElement(n.Trans,{i18nKey:"CommonError.networkError"},"The server cannot be reached. Please try again.");if((o.ErrorHelper.isAxiosError(r)&&r.response&&r.response.status)===504)return e.createElement(a.ServerError,{buttonAction:()=>window.location.reload()});const c=o.ErrorHelper.extractServiceErrorCode(r)||0,t=a.translateServiceError(c);return t?e.createElement(e.Fragment,null,t):(o.ErrorHelper.isAxiosError(r)&&((s=r==null?void 0:r.response)==null?void 0:s.status))===403?e.createElement(n.Trans,{i18nKey:"CommonError.playerPortal.forbidden"},"You cannot access this page. Please go back."):o.ErrorHelper.isAxiosServerError(r)?e.createElement(n.Trans,{i18nKey:"CommonError.serverError"},"We are experiencing some technical issues right now. Please try again later."):e.createElement(n.Trans,{i18nKey:"CommonError.unknownError"},"Something went wrong. Please contact support for assistance.")};exports.CommonError=E;
