1(this.webpackJsonpsubscription=this.webpackJsonpsubscription||[]).push([[42],{1146:function(e,t,n){"use strict";n.r(t),n.d(t,"CheckoutPage",(function(){return L}));var o=n(3),r=n(2),i=n(38),c=n(14),s=n(178),d=n(23),a=n(79),l=n(9),u=n.p+"static/media/amico.9545358d.png",m=n.p+"static/media/failedIcon.204233fd.png",h=n(5),b=n(18),p=n(6),g=n(7);const j=()=>Object(g.a)(p.b.imageTitle.error,"error"),v=()=>Object(g.a)(p.b.imageTitle.success,"success");var f=n(232),O=n(866),x=n(181),w=n(40),y=n(0);const L=()=>{const{t:e}=Object(f.a)(),t=Object(l.c)(),{actions:n}=Object(a.c)(),o=Object(i.h)().search,d=new URLSearchParams(o).get("status"),h=new URLSearchParams(o).get("reason");Object(l.d)(x.d);Object(r.useEffect)((()=>{t(n.getUser())}),[n,t]),Object(O.a)(w.f,{shouldPreventLoad:"successful"!==d,textNode:w.g}),Object(O.a)(w.d,{shouldPreventLoad:"failed"!==d,textNode:w.e});return Object(y.jsx)(s.a,{children:"successful"===d?Object(y.jsxs)(C,{children:[Object(y.jsx)("img",{src:u,alt:e(...v()),title:e(...v())}),Object(y.jsx)(E,{children:"successful"===d?"Successful payment":""}),Object(y.jsx)(N,{children:h}),Object(y.jsx)(I,{children:"Thanks for shopping with us. I\u2019m sure you had a wonderful experience, click on the button below to continue shopping"}),Object(y.jsx)(c.b,{to:"/",children:Object(y.jsx)(k,{type:"button",className:"btn btn-primary",children:"Continue Shopping"})})]}):Object(y.jsxs)("div",{children:[Object(y.jsxs)(C,{children:[Object(y.jsx)("img",{src:m,alt:e(...j()),title:e(...j())}),Object(y.jsx)(E,{children:"failed"===d?"Unsuccessful payment":""}),Object(y.jsx)(N,{children:h})]}),Object(y.jsx)(k,{type:"button",className:"btn btn-primary",onClick:()=>{const e=Object(b.a)("orderDetails"),o=JSON.parse(e),r={order_id:o.id,amount:o.amount};t(n.payWithCard(r))},children:"Try again"})]})})},C=o.d.div.withConfig({componentId:"sc-2xu7tm-0"})(["background-color:",";img{width:100%;height:40% !important;margin:auto;}",";"],(e=>e.theme.color.colorBackgroundBody),h.a.lessThan("xmedium")` 2 padding: 3rem; 3 margin-top: 8rem; 4 `),E=o.d.h1.withConfig({componentId:"sc-2xu7tm-1"})(["font-weight:bold;font-size:1rem;margin:1rem 0;width:100%;text-align:center;"]),I=o.d.p.withConfig({componentId:"sc-2xu7tm-2"})(["font-weight:bold;font-size:0.75rem;margin:1rem 0;width:100%;text-align:center;"]),k=Object(o.d)(d.a).withConfig({componentId:"sc-2xu7tm-3"})(["width:100%;margin:auto;margin-top:2rem;"]),N=o.d.p.withConfig({componentId:"sc-2xu7tm-4"})(["font-weight:normal;font-size:15px;line-height:100%;text-align:center;"])},866:function(e,t,n){"use strict";var o=n(2);const r={};t.a=function(e,t){const[n,i]=Object(o.useState)((()=>{var n;return!e||null!==t&&void 0!==t&&t.shouldPreventLoad?"idle":"undefined"===typeof window?"loading":null!==(n=r[e])&&void 0!==n?n:"loading"}));return Object(o.useEffect)((()=>{if(!e||null!==t&&void 0!==t&&t.shouldPreventLoad)return;const n=r[e];if("ready"===n||"error"===n)return void i(n);const o=function(e){const t=document.querySelector(`script[src="${e}"]`),n=null===t||void 0===t?void 0:t.getAttribute("data-status");return{node:t,status:n}}(e);let c=o.node;const s=()=>
4{if(c){var r,s;i(null!==(r=null!==(s=o.status)&&void 0!==s?s:n)&&void 0!==r?r:"loading")}else{if(c=document.createElement("script"),c.src=e,c.async=!0,c.setAttribute("data-status","loading"),null!==t&&void 0!==t&&t.textNode){const e=document.createTextNode(t.textNode);c.appendChild(e)}document.body.appendChild(c);const n=e=>{var t;const n="load"===e.type?"ready":"error";null===(t=c)||void 0===t||t.setAttribute("data-status",n)};c.addEventListener("load",n),c.addEventListener("error",n)}};let d;null!==t&&void 0!==t&&t.delayInMs?d=setTimeout((()=>s()),t.delayInMs):s();const a=t=>{const n="load"===t.type?"ready":"error";i(n),r[e]=n};return c&&(c.addEventListener("load",a),c.addEventListener("error",a)),()=>{d&&clearTimeout(d),c&&(c.removeEventListener("load",a),c.removeEventListener("error",a)),c&&null!==t&&void 0!==t&&t.removeOnUnmount&&c.remove()}}),[e,null===t||void 0===t?void 0:t.shouldPreventLoad,null===t||void 0===t?void 0:t.removeOnUnmount]),n}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.