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

23 lines (22 loc) • 935 B
JavaScript
import p from "../../../../config/disputes/defenseDocumentConfig.json.js";
import d from "../../../../config/disputes/defenseReasonConfig.json.js";
const h = (e, n, c) => {
const o = `${n}.${c}`;
return e.has(o) ? e.get(o) : void 0;
}, u = (e, n, c, o) => {
const t = n[c];
if (!t) return;
const g = h(e, o, t.title), l = t.help ? Array.isArray(t.help) ? t.help : [t.help] : void 0, r = l == null ? void 0 : l.map((f) => h(e, o, f)).filter((f) => f !== void 0), s = [];
return t.helpitems && t.helpitems.forEach((f) => {
const i = h(e, o, f);
i && s.push(i);
}), {
title: g || "",
...r != null && r.length ? { primaryDescriptionItems: r } : {},
...s != null && s.length ? { secondaryDescriptionItems: s } : {}
};
}, C = (e, n) => u(e, p, n, "disputes.defenseDocument"), v = (e, n) => u(e, d, n, "disputes.defenseReason");
export {
C as getDefenseDocumentContent,
v as getDefenseReasonContent
};