UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

23 lines (22 loc) 935 B
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 };