import { jsx as m } from "../../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { UNDEFINED_ERROR as a } from "../../../../../utils/getCommonErrorCode.js";
import c from "../../../../../internal/CopyText/CopyText.js";
const i = "ACCOUNT_MISCONFIGURATION", g = "WRONG_STORE_IDS", u = "PERMISSION_ERROR", C = (e, r, t, s) => {
  if (!e) return a;
  const n = t ? "common.errors.errorCode" : "common.errors.errorCodeSupport", o = {
    [n]: e.requestId ? /* @__PURE__ */ m(c, { copyButtonAriaLabelKey: "common.actions.copy.labels.errorCode", textToCopy: e.requestId }) : null
  };
  switch (e.errorCode) {
    case i:
      return {
        title: "common.errors.somethingWentWrong",
        message: ["payByLink.common.errors.accountConfiguration", "common.errors.contactSupport"],
        translationValues: o
      };
    case g:
      return {
        title: "common.errors.somethingWentWrong",
        message: ["payByLink.common.errors.storeID", "common.errors.contactSupport"],
        translationValues: o,
        onContactSupport: t
      };
    case u:
      return {
        title: "common.errors.somethingWentWrong",
        message: [r],
        translationValues: o,
        refreshComponent: !1
      };
    case "00_500":
      return {
        title: "common.errors.somethingWentWrong",
        message: [r, n],
        translationValues: o,
        refreshComponent: !0,
        images: {
          desktop: s?.({ name: "wrong-environment", subFolder: "images/small" })
        }
      };
    default:
      return {
        title: "common.errors.somethingWentWrong",
        message: [r, n],
        translationValues: o,
        refreshComponent: !0,
        images: {
          desktop: s?.({ name: "wrong-environment", subFolder: "images/small" })
        }
      };
  }
};
export {
  i as ACCOUNT_MISCONFIGURATION,
  u as PERMISSION_ERROR,
  g as WRONG_STORE_IDS,
  C as default
};
