UNPKG

@atlas-kitchen/adyen-web

Version:
3 lines (2 loc) 1.35 kB
import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import o from"./components/MultibancoVoucherResult/MultibancoVoucherResult.js";import{CoreProvider as r}from"../../core/Context/CoreProvider.js";import n from"../internal/RedirectButton/RedirectButton.js";import{TxVariants as s}from"../tx-variants.js";function i(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class a extends e{get isValid(){return!0}formatProps(t){return{...t,name:t.name||"Multibanco"}}formatData(){return{paymentMethod:{type:this.props.type||a.type}}}render(){return this.props.reference?t(r,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},t(o,{ref:this.handleRef,...this.props,onActionHandled:this.onActionHandled})):this.props.showPayButton?t(r,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},t(n,{showPayButton:this.props.showPayButton,name:this.displayName,amount:this.props.amount,payButton:this.payButton,onSubmit:this.submit,ref:t=>{this.componentRef=t}})):null}constructor(...t){super(...t),i(this,"handleRef",(t=>{this.componentRef=t}))}}i(a,"type",s.multibanco);export{a as MultibancoElement,a as default}; //# sourceMappingURL=Multibanco.js.map