import { jsx as n } from "../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { UNDEFINED_ERROR as s } from "../../../../utils/getCommonErrorCode.js";
import m from "../../../../internal/CopyText/CopyText.js";
const u = (e, r, o) => {
  if (!e) return s;
  switch (e.errorCode) {
    case void 0:
      return {
        title: "common.errors.somethingWentWrong",
        message: [r, "common.errors.retry"],
        refreshComponent: !0
      };
    case "500": {
      const t = o ? "common.errors.errorCode" : "common.errors.errorCodeSupport";
      return {
        title: "common.errors.somethingWentWrong",
        message: [r, t],
        translationValues: {
          [t]: e.requestId ? /* @__PURE__ */ n(m, { isUnderlineVisible: !0, copyButtonAriaLabelKey: "common.actions.copy.labels.errorCode", textToCopy: e.requestId }) : null
        },
        onContactSupport: o
      };
    }
    default:
      return s;
  }
};
export {
  u as getPaymentLinkErrorMessage
};
