import{checkPaymentMethodsResponse as e,processPaymentMethods as t,processStoredPaymentMethods as n}from"./utils.js";function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class o{mapCreatedComponentType(e){return"card"===e?"scheme":e}has(e){return Boolean(this.paymentMethods.find(t=>t.type===this.mapCreatedComponentType(e)))}find(e){return this.paymentMethods.find(t=>t.type===this.mapCreatedComponentType(e))}findByFundingSource(e,t){const n=this.mapCreatedComponentType(e);return this.paymentMethods.find(e=>e.type===n&&e.fundingSource===t)}findById(e){return this.paymentMethods.find(t=>t._id===e)}findStoredPaymentMethod(e){return this.storedPaymentMethods.find(t=>t.id===e)}constructor(o,s={}){d(this,"paymentMethods",[]),d(this,"storedPaymentMethods",[]),e(o),this.paymentMethods=o?t(o.paymentMethods,s):[],this.storedPaymentMethods=o?n(o.storedPaymentMethods,s,o.paymentMethods||[]):[]}}export{o as default};
//# sourceMappingURL=PaymentMethods.js.map
