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

21 lines (20 loc) • 782 B
JavaScript
const c = (e, n, s) => {
const o = `${n}.${s}`;
return e.has(o) ? e.get(o) : void 0;
}, a = (e, n, s, o) => {
const t = n[s];
if (!t) return;
const d = c(e, o, t.title), m = (t.help ? Array.isArray(t.help) ? t.help : [t.help] : void 0)?.map((i) => c(e, o, i)).filter((i) => i !== void 0), r = [];
return t.helpitems && t.helpitems.forEach((i) => {
const p = c(e, o, i);
p && r.push(p);
}), {
title: d || "",
...m?.length ? { primaryDescriptionItems: m } : {},
...r?.length ? { secondaryDescriptionItems: r } : {}
};
}, h = (e, n, s) => a(n, e, s, "disputes.management.common.defenseDocuments"), f = (e, n, s) => a(n, e, s, "disputes.management.common.defenseReasons");
export {
h as getDefenseDocumentContent,
f as getDefenseReasonContent
};