(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{94:function(e,t,n){},96:function(e,t,n){"use strict";n.r(t);var a=n(0),r=(n(94),n(20)),c=n.n(r),o=n(93),i=n(95),l=n(28),s=n(10),u=n(5),b=n(15);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,c,o,i=[],l=!0,s=!1;try{if(c=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=c.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}t.default=function(){var e=location&&location.search?Object(s.parse)(location.search.substring(1)):{},t=Object(o.a)().setIsRightHeader,n=f(Object(a.useState)(""),2),r=n[0],m=n[1],p=f(Object(a.useState)(!1),2),w=p[0],d=p[1],j=f(Object(a.useState)(!1),2),y=j[0],O=j[1],g=f(Object(a.useState)(!1),2),h=g[0],v=g[1];Object(a.useEffect)((function(){t(!1)}),[]),Object(a.useEffect)((function(){try{c()({path:"fkwcs-onboard/error-stripe",method:"get"}).then((function(e){e.status&&m(e.data.connect_url)}))}catch(e){console.log(e)}}),[]);return Object(a.useEffect)((function(){h&&Object(l.b)({},"/checkout",e)}),[h]),Object(a.createElement)("div",{className:"bwf-container"},!h&&Object(a.createElement)("div",{className:"bwf-failed-container"},Object(a.createElement)("div",{className:"bwf-align-center bwf-mb-16 bwf-mt-72"},Object(a.createElement)("img",{src:"".concat(bwfsg.images_dir,"Failed.png")})),Object(a.createElement)("div",{className:"bwf-page-title bwf-mb-4 bwf-align-center"},Object(u.__)("Oops! Unable to connect","funnelkit-stripe-woo-payment-gateway")),Object(a.createElement)("p",{className:"bwf-align-center bwf-description bwf-mb-16"},Object(u.__)("Please give it another try!","funnelkit-stripe-woo-payment-gateway")),Object(a.createElement)("div",{className:"bwf-align-center "},Object(a.createElement)(b.a,{isPrimary:!0,className:"bwf-button",onClick:function(){d(!0),window.location.replace(r)},isBusy:w,disabled:w},Object(u.__)("Try Again","funnelkit-stripe-woo-payment-gateway")),Object(a.createElement)("br",null),Object(a.createElement)("div",{className:"bwf-need-help-text"},Object(u.__)("Need help? ","funnelkit-stripe-woo-payment-gateway"),Object(a.createElement)("a",{href:"https://funnelkit.com/support/",target:"_blank"},Object(u.__)("Contact Support","funnelkit-stripe-woo-payment-gateway"))))),y&&Object(a.createElement)(i.a,{isFailed:!0,onCloseModal:function(){return O(!1)},onSuccess:function(){O(!1),v(!0)}}))}}}]);