import{createElement as e}from"../../../../external/preact/dist/preact.js";import t from"./PaymentMethodIcon.js";import{useCoreContext as a}from"../../../../core/Context/CoreProvider.js";import n from"../../../../core/Context/useImage.js";const o=({order:o,orderStatus:r,onOrderCancel:d,brandLogoConfiguration:m})=>{var c;const{i18n:u}=a(),l=n();return e("div",null,e("ul",{className:"adyen-checkout__order-payment-methods-list"},null==r||null===(c=r.paymentMethods)||void 0===c?void 0:c.map((a,n)=>e("li",{key:`${a.type}-${n}`,className:"adyen-checkout__order-payment-method"},e("div",{className:"adyen-checkout__order-payment-method__header"},e("div",{className:"adyen-checkout__payment-method__header__title"},e(t,{altDescription:a.name,type:a.type,src:m[a.type]||l()(a.type)}),a.label?`${a.label}`:`•••• ${a.lastFour}`),d&&e("button",{type:"button",className:"adyen-checkout__button adyen-checkout__button--inline adyen-checkout__button--link",onClick:()=>{d({order:o})}},u.get("storedPaymentMethod.disable.button"))),e("div",{className:"adyen-checkout__order-payment-method__details"},e("div",{className:"adyen-checkout__order-payment-method__deducted-amount"},e("span",{className:"adyen-checkout__order-payment-method__deducted-amount__label"},u.get("deductedBalance")),e("span",{className:"adyen-checkout__order-payment-method__deducted-amount__value"},u.amount(a.amount.value,a.amount.currency))))))),r.remainingAmount&&e("p",{className:"adyen-checkout__order-remaining-amount"},u.get("partialPayment.warning")," ",e("strong",null,u.amount(r.remainingAmount.value,r.remainingAmount.currency))))};export{o as OrderPaymentMethods,o as default};
//# sourceMappingURL=OrderPaymentMethods.js.map
