@adyen/adyen-web
Version:
[](https://www.npmjs.com/package/@adyen/adyen-web)
3 lines (2 loc) • 945 B
JavaScript
import{optionallyFilterUpiSubTxVariants as t,filterUnsupportedPaymentMethod as e,filterPresent as o,filterAvailable as n}from"./filters.js";import{getComponentConfiguration as r}from"./getComponentConfiguration.js";import p from"../../components-name-map.js";function s(t){return"isStoredPaymentMethod"in t&&!0===t.isStoredPaymentMethod}const i=(i,m,a,d)=>{const h=t(i).filter(e).map(t=>{const e=r(t.type,m,s(t)),o=d.getComponent(t.type);if(!o)return console.warn(`\nDropin: You support the payment method '${t.type}' but this component has not been configured. Make sure to import the Class '${p(t.type)}' and then pass it in the Dropin's 'paymentMethodComponents' config property if you wish to offer this payment method.`),null;const n={...{...s(t)?{storedPaymentMethodId:t.storedPaymentMethodId}:{paymentMethodId:t._id},...a},...e};return new o(d,n)}).filter(o);return n(h)};export{i as default};
//# sourceMappingURL=createElements.js.map