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)

27 lines (26 loc) 593 B
import { RefundType as r } from "./types.js"; import { EMPTY_OBJECT as n } from "../../../utils/value/constants.js"; const a = (e) => { switch (e?.status) { case "Booked": return "default"; case "Reversed": return "error"; default: return "pending"; } }, s = (e) => { if (e?.category === "Refund") { const { refundType: t } = e.refundMetadata ?? n; switch (t) { case r.FULL: return r.FULL; case r.PARTIAL: return r.PARTIAL; } } }; export { a as getAmountStyleForTransaction, s as getRefundTypeForTransaction };