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.14 kB
import{createElement as t,Fragment as e}from"../../external/preact/dist/preact.js";import{CoreProvider as s}from"../../core/Context/CoreProvider.js";import o from"../Redirect/Redirect.js";import r from"../internal/RedirectButton/RedirectButton.js";import{TxVariants as a}from"../tx-variants.js";import n from"../../utils/get-issuer-image.js";import i from"../internal/PayButton/PayButton.js";import{payAmountLabel as p}from"../internal/PayButton/utils.js";class m extends o{formatProps(t){return{keepBrandsVisible:!0,showOtherInsteafOfNumber:!0,...t}}formatData(){return{paymentMethod:{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=n({},"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(s,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},this.props.storedPaymentMethodId?this.props.showPayButton&&t(i,{...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(r,{...this.props,showPayButton:this.props.showPayButton,name:this.displayName,onSubmit:this.submit,payButton:this.payButton,ref:t=>{this.componentRef=t}})))}}var d,h,y;d=m,h="type",y=a.paybybank_AIS_DD,h in d?Object.defineProperty(d,h,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[h]=y;export{m as default}; //# sourceMappingURL=PayByBankUS.js.map