1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1546],{4895:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/order/checkout",function(){return r(38826)}])},9945:function(e,s,r){"use strict";var n=r(8014),t=r(73801),c=r(62044),l=r(30396),a=function(){var e,s,r,a,d,o,i,u,m,x,p,h,v,f,j=(0,c.Z)("common"),y=j.t,N=j.lang,g=(0,t.VQ)(N),b=(0,l.v9)(function(e){return e.order}).order;return b&&b._id?(console.log("ORDER:::",b),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"bg-white w-full py-6",children:(0,n.jsxs)("div",{className:"space-y-4 md:space-y-6",children:[(0,n.jsx)("h1",{className:"text-1.25em font-semibold leading-tight",children:y("Order Summary")}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)("table",{className:"w-full text-start",children:(0,n.jsxs)("tbody",{children:[(0,n.jsxs)("tr",{className:"",children:[(0,n.jsx)("td",{scope:"row",className:"py-2",children:y("Subtotal")}),(0,n.jsxs)("td",{className:"py-2 text-end",children:[null==b?void 0:null===(e=b.currency)||void 0===e?void 0:e.toUpperCase()," ",b.sub_total]})]}),b.discount&&b.discount.coupon&&b.discount.coupon._id&&(0,n.jsxs)("tr",{className:"",children:[(0,n.jsxs)("td",{scope:"row",className:"py-2",children:[(0,n.jsx)("p",{className:"!mb-1",children:y("Coupon")}),(0,n.jsx)("span",{className:"rounded bg-orange-400 text-white text-xs px-1 py-1",children:b.discount.applied_coupon})," - ","percentage"==b.discount.coupon.coupon_type?b.discount.coupon.discount_value+"%":""]}),"percentage"==b.discount.coupon.coupon_type&&(0,n.jsxs)("td",{className:"py-2 text-end text-green-700",children:["-",null==b?void 0:null===(s=b.currency)||void 0===s?void 0:s.toUpperCase()," ",b.discount.amount]}),"free"==b.discount.coupon.coupon_type&&(0,n.jsx)("td",{className:"py-2 text-end text-green-700",children:(null==b?void 0:null===(r=b.discount)||void 0===r?void 0:null===(a=r.coupon)||void 0===a?void 0:null===(d=a.free_product)||void 0===d?void 0:d.name[g])||(null==b?void 0:null===(o=b.discount)||void 0===o?void 0:null===(i=o.coupon)||void 0===i?void 0:null===(u=i.free_product)||void 0===u?void 0:u.name.en)||(null==b?void 0:null===(m=b.discount)||void 0===m?void 0:null===(x=m.coupon)||void 0===x?void 0:null===(p=x.free_product)||void 0===p?void 0:p.name)})]}),(0,n.jsxs)("tr",{className:"",children:[(0,n.jsx)("td",{scope:"row",className:"py-2 text-start",children:y("Tax")}),(0,n.jsxs)("td",{className:"py-2 text-end",children:[null==b?void 0:null===(h=b.currency)||void 0===h?void 0:h.toUpperCase()," ",b.vat.incl]})]}),b.amount_from_wallet&&Number(b.amount_from_wallet)>0&&(0,n.jsxs)("tr",{className:"",children:[(0,n.jsx)("td",{scope:"row",className:"py-2 text-start",children:y("Wallet credits")}),(0,n.jsxs)("td",{className:"py-2 text-end",children:["-",null==b?void 0:null===(v=b.currency)||void 0===v?void 0:v.toUpperCase()," ",b.amount_from_wallet]})]}),(0,n.jsxs)("tr",{className:"border-t border-t-gray-400 border-spacing-6",children:[(0,n.jsx)("th",{scope:"row",className:"py-2 text-start",children:y("Amount to Pay")}),(0,n.jsxs)("th",{className:"py-2 text-end",children:[null==b?void 0:null===(f=b.currency)||void 0===f?void 0:f.toUpperCase()," ",b.amount_to_pay-Number((null==b?void 0:b.amount_from_wallet)|0)]})]})]})}),b.has_free_toy&&(0,n.jsx)("p",{className:"italic text-green-600 text-sm text-center font-semibold my-6",children:y("toy-promo-message",{count:b.free_toy_qty})})]})]})})})):null};s.Z=a},55656:function(e,s,r){"use strict";r.d(s,{Z:function(){return d}});var n=r(8014);r(56168);var t=r(62044),c=r(75332),l=function(e){var s=e.active;return(0,n.jsxs)("div",{className:"hidden md:flex justify-start items-center ".concat(void 0!==s&&s?"text-green-700":""),children:[(0,n.jsx)("span",{className:"divider",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-6 h-6",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M3.75 12a.75.75 0 01.75-.75h15a.75.75 0 010 1.5h-15a.75.75 0 01-.75-.75z",clipRule:"evenodd"})})}),(0,n.jsx)("span",{className:"mx-2",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor",className:"w-6 h-6",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",clipRule:"evenodd"})})}),(0,n.jsx)("span",{className:"divider",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-6 h-6",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M3.75 12a.75.75 0 01.75-.75h15a.75.75 0 010 1.5h-15a.75.75 0 01-.75-.75z",clipRule:"evenodd"})})})]})},a=function(){(0,t.Z)("common").t,(0,c.useRouter)();var e=(0,c.useRouter)(),s=(e.query,e.pathname),r="text-xl md:text-base font-semibold text-secondary block";return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"w-full py-6 px-10 border-b border-gray-300",children:(0,n.jsx)("div",{className:"space-y-4 md:space-y-6",children:(0,n.jsxs)("div",{className:"w-full flex flex-col md:flex-row justify-center items-center md:space-x-8 text-center",children:[(0,n.jsx)("h4",{className:"/order/cart"==s?r:"hidden md:block",children:"Cart"}),(0,n.jsx)(l,{active:"/order/cart"==s||"/order/checkout"==s||"/order/payment"==s||"/order/success"==s}),(0,n.jsx)("h4",{className:"/order/checkout"==s?r:"hidden md:block",children:"Order Summary"}),(0,n.jsx)(l,{active:"/order/payment"==s||"/order/success"==s}),(0,n.jsx)("h4",{className:"/order/payment"==s?r:"hidden md:block",children:"Payment"}),(0,n.jsx)(l,{active:"/order/success"==s}),(0,n.jsx)("h4",{className:"/order/success"==s?r:"hidden md:block",children:"Complete"})]})})})})},d=function(e){var s=e.children;return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("section",{className:"my-8 md:my-16 max-w-6xl mx-auto container min-h-screen",children:[(0,n.jsx)(a,{}),s]})})}},38826:function(e,s,r){"use strict";r.r(s),r.d(s,{__N_SSP:function(){return C},default:function(){return Z}});var n=r(43692),t=r(61557),c=r(8014),l=r(62044),a=r(56168),d=r(55656),o=r(9945),i=r(75657),u=r.n(i),m=r(79199),x=r(5447),p=r(99728),h=r(73335),v=r(92318),f=r(73801),j=r(78447),y=r(30396),N=r(57350),g=function(){var e=(0,l.Z)("common"),s=(e.t,e.lang),r=(0,y.v9)(function(e){return e.order}).order,n=(0,y.v9)(function(e){return e.user}),t=(n.user,n.token),d=(0,a.useState)(!1),o=d[0],i=d[1],u=(0,y.I0)(),g=(0,j.cI)(),b=g.register,w=g.handleSubmit,_=function(e){!o&&(i(!0),(0,h.uB)(t),e.order_id=r._id,h.ZP.post("/api/user/checkout/apply-coupon",(0,x.Z)({},e),s).then(function(e){200==e.status?(u((0,v.Cs)(e.data)),N.Am.success("Coupon applied successfully")):(0,f.x2)(e.data),i(!1)}).catch(function(e){i(!1),(0,f.x2)(e)}))};return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)("div",{className:"bg-white w-full py-10",children:(0,c.jsxs)("div",{className:"space-y-4 md:space-y-6",children:[(0,c.jsx)("h1",{className:"text-1.25em font-semibold leading-tight",children:"Discount Coupon"}),(0,c.jsxs)("form",{className:"w-full flex gap-4",onSubmit:w(function(e){_(e)}),children:[(0,c.jsx)("input",(0,p.Z)((0,x.Z)({type:"text",id:"code"},b("code")),{className:"border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"})),(0,c.jsx)(m.Z,{color:"secondary",type:"submit",children:"Apply"})]})]})})})},b=r(82952),w=function(e){var s=e.items,r=e.currency,n=void 0===r?"AED":r,t=(0,l.Z)("common"),d=t.t,o=t.lang,i=(0,f.VQ)(o),u=(0,a.useState)(!1);u[0],u[1];var m=(0,b.K)();return m.makeContextualHref,m.returnHref,(0,y.v9)(function(e){return e.order}).cart,(0,y.v9)(function(e){return e.user}).token,(0,y.I0)(),(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)("div",{className:"cartWrap",children:[(0,c.jsxs)("p",{children:[s.length," ",d("items in your cart")]}),(0,c.jsx)("div",{className:"cartItemsWrap space-y-6 mb-6",children:null==s?void 0:s.map(function(e){var s,r,t,l;return e&&e.name?(0,c.jsx)("div",{className:"cartItem flex border-b border-gray-300 py-4 last:border-b-0",children:(0,c.jsxs)("div",{className:"productDetails w-full flex justify-between items-center",children:[(0,c.jsxs)("div",{className:"productSpecs px-0",children:[(0,c.jsxs)("p",{className:"text-lg block !mb-2",children:[e.name[i],(null===(s=e.pam)||void 0===s?void 0:s.child_
1name)?" - ".concat(null===(r=e.pam)||void 0===r?void 0:r.child_name):""]}),(0,c.jsxs)("p",{className:"",children:["gift_card"==e.type?(0,c.jsx)("span",{className:"text-xs px-1 py-1 bg-orange-400 text-white rounded",children:"Gift Card"}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"pr-2",children:null==e?void 0:null===(t=e.card)||void 0===t?void 0:t.card_name}),(0,c.jsxs)("span",{className:"text-xs px-1 py-1 bg-gray-200 text-gray-500 rounded mx-2",children:[e.new_card?"New Card":null===(l=e.card)||void 0===l?void 0:l.card_number," "]})]}),e.has_free_product?(0,c.jsx)("span",{className:"text-xs px-1 py-1 bg-green-400 text-white rounded mx-3",children:e.free_product.name[i]}):null]}),(0,c.jsx)("p",{}),(0,c.jsxs)("div",{children:[d("Quantity"),": ",e.qty]})]}),(0,c.jsx)("div",{className:"price flex flex-col text-right justify-between items-end space-y-6",children:(0,c.jsx)("div",{className:"flex flex-col",children:(0,c.jsxs)("span",{className:"text-lg font-semibold",children:[n.toUpperCase()," ",e.actual_price]})})})]})},e._id):null})})]})})},_=r(75332),k=r(40981),C=!0,Z=function(){var e=(0,l.Z)("common"),s=(e.t,e.lang),r=(0,y.I0)(),i=(0,_.useRouter)(),x=(0,y.v9)(function(e){return e.user}),p=(x.user,x.token),j=(0,y.v9)(function(e){return e.order}),b=(j.cart,j.order),C=(0,a.useState)(!1),Z=C[0],S=C[1],R=(0,a.useState)(!1),P=R[0],E=R[1];(0,a.useEffect)(function(){document.querySelector("body"),document.body.classList.add("bodyWhite")},[]),(0,a.useEffect)(function(){function e(){return(e=(0,n.Z)(function(){var e,n;return(0,t.__generator)(this,function(t){switch(t.label){case 0:return S(!0),n="/api/user/checkout","".concat((e="FV").toLowerCase()),(0,h.uB)(p),[4,h.ZP.post(n,{},s).then(function(e){200==e.status?(S(!1),r((0,v.Cs)(e.data)),(0,f.BX)(e.data),(0,f.KY)(e.data)):(N.Am.error("No active order"),i.push("/"))}).catch(function(e){})];case 1:return t.sent(),[2]}})})).apply(this,arguments)}!function(){return e.apply(this,arguments)}()},[]);var F=function(){P?i.push("/order/payment"):N.Am.error("You must accept terms and conditions")};return Z?(0,c.jsx)("div",{className:"my-20",children:(0,c.jsx)(k.Z,{})}):b&&b.items?(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(d.Z,{children:(0,c.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-7 mt-10 gap-6",children:[(0,c.jsx)("div",{className:"md:col-span-4",children:(0,c.jsxs)("div",{className:"shadow rounded-xl border border-gray-100 px-6",children:[(0,c.jsx)("h2",{className:"text-1.25em font-semibold leading-tight py-8",children:"Order Summary"}),(0,c.jsx)(w,{items:b.items,currency:b.currency})]})}),(0,c.jsxs)("div",{className:"flex flex-col md:col-span-3 h-fit gap-6",children:[(0,c.jsx)("div",{className:"shadow rounded-xl border border-gray-100 px-6 pb-4",children:(0,c.jsx)(g,{})}),(0,c.jsx)("div",{className:"shadow rounded-xl border border-gray-100 px-6 pb-4",children:(0,c.jsx)(o.Z,{})}),(0,c.jsxs)("div",{className:"shadow rounded-xl border border-gray-100 px-6 pb-4",children:[(0,c.jsxs)("div",{className:"terms text-sm my-6",children:[(0,c.jsx)("input",{type:"checkbox",className:"mr-2",onChange:function(e){return E(!P)},checked:P}),(0,c.jsxs)("label",{children:["Please check to acknowledge our"," ",(0,c.jsx)(u(),{href:"/page/terms-and-conditions-and-privacy-policy",target:"_blank",children:(0,c.jsx)("a",{className:"text-secondary",children:"Privacy & Terms Policy"})})]})]}),(0,c.jsx)(m.Z,{onClick:F,color:"secondary",className:"w-full text-center",children:"Continue"})]})]})]})})}):(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(d.Z,{children:(0,c.jsxs)("div",{className:"grid grid-cols-1",children:[(0,c.jsx)("h2",{className:"text-1.25em font-semibold leading-tight my-8",children:"There is no active order."}),(0,c.jsx)("h3",{children:"Start ordering now."})]})})})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=4895)}),_N_E=e.O()}]);
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.