text: "use strict";define("paypalButton",["core","lodash","santaProps","reactDOM","utils"],function(e,t,a,i,o){function n(e,t){return"userLang"===e?t:e}function r(e,t){var a=n(e,t)||"";return _[a.toLowerCase()]||_.en}function p(e){var t={};return"buy"===e.buttonType?(t.cmdType="_xclick",t.buildNotation="Wix_BuyNow_WPS_IL",t.itemName=e.itemName,t.itemNumber=e.itemID):(t.cmdType="_donations",t.buildNotation="Wix_Donate_WPS_IL",t.itemName=e.organizationName,t.itemNumber=e.organizationID),t}function m(e){return"buy"===e?s:c}var u=e.compMixins,l=a.Types,s="Buy now via PayPal",c="Donate via PayPal",_={da:{image:"da_DK",pixel:"da_DK"},de:{image:"de_DE",pixel:"de_DE"},en:{image:"en_US",pixel:"en_US"},es:{image:"es_ES",pixel:"es_ES"},fr:{image:"fr_FR",pixel:"fr_FR"},it:{image:"it_IT",pixel:"it_IT"},ja:{image:"ja_JP",pixel:"ja_JP"},jp:{image:"ja_JP",pixel:"ja_JP"},nl:{image:"nl_NL",pixel:"nl_NL"},no:{image:"no_NO",pixel:"en_US"},pl:{image:"pl_PL",pixel:"pl_PL"},pt:{image:"pt_BR",pixel:"pt_BR"},ru:{image:"ru_RU",pixel:"en_US"},sv:{image:"sv_SE",pixel:"sv_SE"},tr:{image:"tr_TR",pixel:"tr_TR"}};return{displayName:"PayPalButton",mixins:[u.skinBasedComp],propTypes:{compData:l.Component.compData,compProp:l.Component.compProp,currentUrl:l.currentUrl,userLanguage:a.Types.WixUserSantaTypes.userLanguage.isRequired},statics:{useSantaTypes:!0},onImageChanged:function(){this.registerReLayout(),this.forceUpdate()},submitForm:function(){i.findDOMNode(this.refs.form).submit()},handleSubmitImageKeyPress:function(e){t.includes([" ","Enter"],e.key)&&(this.submitForm(),e.preventDefault())},getSkinProperties:function(){var e=this.props,a=p(e.compProp),i=r(e.compProp.language,this.props.userLanguage),n=e.currentUrl.full,u=e.compProp.amount;return{form:{target:e.compProp.target},cmd:{value:a.cmdType},item_name:{value:a.itemName},item_number:{value:a.itemNumber},bn:{value:a.buildNotation},business:{value:e.compData.merchantID},currency_code:{value:e.compProp.currencyCode},notify_url:{value:"https://inventory.wix.com/ecommerce/ipn/paypal"},return:{value:n},cancel_return:{value:n},amount:{value:parseFloat(u,10)>0?u:void 0},trackingPixel:{src:t.template("https://www.paypalobjects.com/${locale}/i/scr/pixel.gif")({locale:i.pixel}),role:"none"},submitImage:{src:t.template("https://www.paypalobjects.com/${locale}/i/btn/btn_${buttonType}${showCreditCards}${buttonSize}.gif")({locale:i.image,buttonType:"buy"===e.compProp.buttonType?"buynow":"donate",showCreditCards:e.compProp.showCreditCards&&!e.compProp.smallButton?"CC":"",buttonSize:e.compProp.smallButton?"_SM":"_LG"}),onLoad:this.onImageChanged,onClick:this.submitForm,onKeyDown:o.accessibility.keyboardInteractions.activateBySpaceOrEnterButton,tabIndex:"0",role:"button","aria-label":m(e.compProp.buttonType)}}}}});
  //# sourceMappingURL=paypalButton.min.js.map