UNPKG

@adyen/adyen-web

Version:

[![npm](https://img.shields.io/npm/v/@adyen/adyen-web.svg)](https://www.npmjs.com/package/@adyen/adyen-web)

3 lines (2 loc) 2.87 kB
import{createElement as t,Fragment as e}from"../../external/preact/dist/preact.js";import{CoreProvider as r}from"../../core/Context/CoreProvider.js";import o from"../Redirect/Redirect.js";import s from"../internal/RedirectButton/RedirectButton.js";import{TxVariants as n}from"../tx-variants.js";import a from"../../utils/get-issuer-image.js";import i from"../internal/PayButton/PayButton.js";import{payAmountLabel as p}from"../internal/PayButton/utils.js";function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){c(t,e,r[e])}))}return t}function y(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e.push.apply(e,r)}return e}(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t}class u extends o{formatProps(t){return m({keepBrandsVisible:!0,showOtherInsteafOfNumber:!0},t)}formatData(){return{paymentMethod:m({type:this.type},this.props.storedPaymentMethodId&&{storedPaymentMethodId:this.props.storedPaymentMethodId}),browserInfo:this.browserInfo}}get displayName(){return this.props.storedPaymentMethodId&&this.props.label?this.props.label:this.props.name}get additionalInfo(){return this.props.storedPaymentMethodId?this.props.name:""}get brands(){const t=a({},"paybybank",(t=>this.resources.getImage(t)));return[{icon:t("US-1"),name:"Wells Fargo"},{icon:t("US-2"),name:"Bank of America"},{icon:t("US-3"),name:"Chase"},{icon:t("US-4"),name:"Citi"}]}render(){return t(r,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},this.props.storedPaymentMethodId?this.props.showPayButton&&t(i,y(m({},this.props),{classNameModifiers:["standalone"],amount:this.props.amount,label:p(this.props.i18n,this.props.amount),onClick:this.submit})):t(e,null,t("div",{className:"adyen-checkout-paybybank_AIS_DD"},t("p",{className:"adyen-checkout-paybybank_AIS_DD__description-header"},this.props.i18n.get("payByBankAISDD.disclaimer.header")),t("p",{className:"adyen-checkout-paybybank_AIS_DD__description-body"},this.props.i18n.get("payByBankAISDD.disclaimer.body"))),this.props.showPayButton&&t(s,y(m({},this.props),{showPayButton:this.props.showPayButton,name:this.displayName,onSubmit:this.submit,payButton:this.payButton,ref:t=>{this.componentRef=t}}))))}}c(u,"type",n.paybybank_AIS_DD);export{u as default}; //# sourceMappingURL=PayByBankUS.js.map