@atlas-kitchen/adyen-web
Version:
3 lines (2 loc) • 1.79 kB
JavaScript
import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import r from"../internal/IbanInput/IbanInput.js";import{CoreProvider as n}from"../../core/Context/CoreProvider.js";import{TxVariants as o}from"../tx-variants.js";import a from"../internal/FormInstruction/FormInstruction.js";function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}function p(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 c extends e{formatProps(t){return s({holderName:!0},t)}formatData(){return{paymentMethod:{type:c.type,iban:this.state.data.ibanNumber,ownerName:this.state.data.ownerName}}}get isValid(){return!!this.state.isValid}render(){return t(n,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},t(a,null),t(r,p(s({ref:t=>{this.componentRef=t}},this.props),{onChange:this.setState,payButton:this.payButton})))}constructor(t,e){super(t,e),this.state=s({},this.state,{data:{ibanNumber:"",ownerName:""}})}}i(c,"type",o.sepadirectdebit);export{c as default};
//# sourceMappingURL=Sepa.js.map