@adyen/adyen-platform-experience-web
Version:

37 lines (36 loc) • 1.06 kB
JavaScript
import { jsx as n } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { UNDEFINED_ERROR as o } from "../getCommonErrorCode.js";
import a from "../../internal/CopyText/CopyText.js";
const m = (e, r, t) => {
if (!e) return o;
switch (e.errorCode) {
case void 0:
return {
title: "somethingWentWrong",
message: [r, "tryRefreshingThePageOrComeBackLater"],
refreshComponent: !0
};
case "00_500": {
const s = t ? "theErrorCodeIs" : "contactSupportForHelpAndShareErrorCode";
return {
title: "somethingWentWrong",
message: [r, s],
translationValues: {
[s]: e.requestId ? /* @__PURE__ */ n(a, { textToCopy: e.requestId }) : null
},
onContactSupport: t
};
}
case "30_112":
return {
title: "disputes.error.entityWasNotFound",
message: ["disputes.error.entityWasNotFoundDetail"],
onContactSupport: t
};
default:
return o;
}
};
export {
m as getDisputesErrorMessage
};