1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4961],{37165:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>v});var s=t(37876),a=t(69086),n=t(68900),i=t(14232),r=t(89099),d=t(82363),o=t(7938),c=t(20441),u=t(95321),m=t(34951),x=t(17745);let h=e=>{let{isOpen:l,onClose:t}=e,{manualChannels:a,midtransChannels:n,setPaymentChannel:i,ipaymuChannels:r,nicepayChannels:d,tripayChannels:u,ryFlipChannels:m,cringChannels:x,setPreventAmountChange:h}=(0,c.J)();return l?(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg max-w-250 max-h-[80vh] p-6 relative shadow-lg overflow-y-auto",children:[(0,s.jsx)("button",{onClick:t,"aria-label":"Close modal",className:"absolute top-3 right-3 text-gray-500 hover:text-gray-700 focus:outline-none",children:"â"}),(0,s.jsx)("div",{className:"mb-10"}),(null==n?void 0:n.length)>0?(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)("div",{className:"bg-gray-100 p-5 rounded-md",children:(0,s.jsx)("span",{className:"text-[0.87rem] font-bold text-universa-font-color",children:"Virtual Accounts & Merchants (Midtrans)"})}),(0,s.jsx)("div",{className:"mt-5",children:null==n?void 0:n.map((e,l)=>(0,s.jsxs)("div",{children:[(0,s.jsx)(o.A,{icon:null==e?void 0:e.thumbnail,title:null==e?void 0:e.title,onClick:l=>{l.preventDefault(),h(!1),i(e),t()},buttonTitle:"Pilih",enableWallet:!0}),l>=0&&l<(null==n?void 0:n.length)-1?(0,s.jsx)("hr",{}):null]},l))})]}):null,(null==r?void 0:r.length)>0?(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)("div",{className:"bg-gray-100 p-5 rounded-md",children:(0,s.jsx)("span",{className:"text-[0.87rem] font-bold text-universa-font-color",children:"Virtual Accounts & Merchants (iPaymu)"})}),(0,s.jsx)("div",{className:"mt-5",children:null==r?void 0:r.map((e,l)=>(0,s.jsxs)("div",{children:[(0,s.jsx)(o.A,{icon:null==e?void 0:e.thumbnail,title:null==e?void 0:e.title,onClick:l=>{l.preventDefault(),i(e),t()},buttonTitle:"Pilih",enableWallet:!0}),l>=0&&l<(null==r?void 0:r.length)-1?(0,s.jsx)("hr",{}):null]},l))})]}):null,(null==d?void 0:d.length)>0?(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)("div",{className:"bg-gray-100 p-5 rounded-md",children:(0,s.jsx)("span",{className:"text-[0.87rem] font-bold text-universa-font-color",children:"Virtual Accounts & Merchants (Nicepay)"})}),(0,s.jsx)("div",{className:"mt-5",children:null==d?void 0:d.map((e,l)=>(0,s.jsxs)("div",{children:[(0,s.jsx)(o.A,{icon:null==e?void 0:e.thumbnail,title:null==e?void 0:e.title,onClick:l=>{l.preventDefault(),i(e),t()},buttonTitle:"Pilih",enableWallet:!0}),l>=0&&l<(null==d?void 0:d.length)-1?(0,s.jsx)("hr",{}):null]},l))})]}):null,(null==u?void 0:u.length)>0?(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)("div",{className:"bg-gray-100 p-5 rounded-md",children:(0,s.jsx)("span",{className:"text-[0.87rem] font-bold text-universa-font-color",children:"Virtual Accounts & Merchants (Tripay)"})}),(0,s.jsx)("div",{className:"mt-5",children:null==u?void 0:u.map((e,l)=>(0,s.jsx)("div",{children:(0,s.jsx)(o.A,{icon:null==e?void 0:e.thumbnail,title:null==e?void 0:e.title,onClick:l=>{l.preventDefault(),h(!1),i(e),t()},buttonTitle:"Pilih",enableWallet:!0})},l))})]}):null,(null==m?void 0:m.length)>0?(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)("div",{className:"bg-gray-100 p-5 rounded-md",children:(0,s.jsx)("span",{className:"text-[0.87rem] font-bold text-universa-font-color",children:"Virtual Accounts & Merchants (Ry Flip)"})}),(0,s.jsx)("div",{className:"mt-5",children:null==m?void 0:m.map((e,l)=>(0,s.jsxs)("div",{children:[(0,s.jsx)(o.A,{icon:null==e?void 0:e.thumbnail,title:null==e?void 0:e.title,onClick:l=>{l.preventDefault(),i(e),t()},buttonTitle:"Pilih",enableWallet:!0}),l>=0&&l<(null==m?void 0:m.length)-1?(0,s.jsx)("hr",{}):null]},l))})]}):null,(null==x?void 0:x.length)>0?(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)("div",{className:"bg-gray-100 p-5 rounded-md",children:(0,s.jsx)("span",{className:"text-[0.87rem] font-bold text-universa-font-color",children:"E-Wallets/QRIS"})}),(0,s.jsx)("div",{className:"mt-5",children:null==x?void 0:x.map((e,l)=>(0,s.jsxs)("div",{children:[(0,s.jsx)(o.A,{icon:null==e?void 0:e.thumbnail,title:null==e?void 0:e.title,onClick:l=>{l.preventDefault(),i(e),t()},buttonTitle:"Pilih",enableWallet:!0}),l>=0&&l<(null==x?void 0:x.length)-1?(0,s.jsx)("hr",{}):null]},l))})]}):null]})}):null},v=()=>{let{setEnableWallet:e,getPaymentChannels:l,paymentLoading:t,paymentChannel:v}=(0,c.J)(),[b,j]=(0,i.useState)(!1),[p,g]=(0,i.useState)(!1),f=(0,r.useRouter)(),{setAmountRecurring:N,totalAmount:y,setDuration:w,setProgramId:k,setTotalAmount:A}=(0,x.F)(),{setAmount:C}=(0,m.G)();return(0,i.useEffect)(()=>
1{l(!0)},[]),(0,i.useEffect)(()=>{e(b)},[b]),(0,i.useEffect)(()=>{f&&(null!==f.query?null!==f.query.totalAmount&&null!==f.query.amount&&null!==f.query.programId&&null!==f.query.duration&&"true"===f.query.recurring?(C(+f.query.totalAmount),N(+f.query.amount),A(+f.query.totalAmount),w(+f.query.duration),k(f.query.programId),j(!0)):(C(0),N(0),A(0),w(0),k(void 0),j(!1)):(C(0),A(0),N(0),w(0),k(void 0),j(!1)))},[f]),(0,s.jsxs)("main",{className:"my-0 mx-auto min-h-full max-w-screen-sm overflow-hidden bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-100",children:[(0,s.jsx)(n.A,{title:"Topup"}),(0,s.jsxs)("div",{className:"pb-20 relative mt-10",children:[(0,s.jsxs)("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[(0,s.jsx)("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-gradient-to-br from-blue-200/30 to-purple-200/30 rounded-full blur-3xl"}),(0,s.jsx)("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-gradient-to-br from-green-200/30 to-blue-200/30 rounded-full blur-3xl"})]}),(0,s.jsxs)("div",{className:"relative z-10 px-6 py-8 text-center",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 bg-gradient-to-br from-amber-500 to-orange-600 rounded-2xl shadow-xl mb-6",children:(0,s.jsx)("svg",{className:"w-10 h-10 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1"})})}),(0,s.jsx)("h1",{className:"text-4xl font-bold text-gray-800 mb-3 bg-gradient-to-r from-gray-800 via-blue-800 to-purple-800 bg-clip-text text-transparent",children:"Top Up Wallet"}),(0,s.jsx)("p",{className:"text-gray-500 max-w-sm mx-auto leading-relaxed",children:"Isi saldo wallet Anda dengan mudah dan aman"}),(0,s.jsxs)("div",{className:"flex justify-center space-x-3 mt-6",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-amber-400 rounded-full animate-bounce"}),(0,s.jsx)("div",{className:"w-3 h-3 bg-orange-400 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,s.jsx)("div",{className:"w-3 h-3 bg-red-400 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})]}),(0,s.jsx)("div",{className:"px-6 mb-8",children:(0,s.jsx)("div",{className:"bg-white/90 backdrop-blur-lg rounded-3xl shadow-xl border border-white/20 overflow-hidden",children:(0,s.jsxs)("div",{className:"p-8",children:[(0,s.jsxs)("div",{className:"text-center mb-6",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"Nominal Topup"}),(0,s.jsx)("p",{className:"text-gray-500",children:"Masukkan jumlah yang ingin Anda isi"})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"bg-gradient-to-r from-gray-50 to-gray-100 rounded-2xl p-6 border-2 border-dashed border-gray-300 hover:border-blue-400 transition-colors duration-300",children:(0,s.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,s.jsx)("div",{className:"flex-shrink-0",children:(0,s.jsx)("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-xl flex items-center justify-center shadow-lg",children:(0,s.jsx)("span",{className:"text-white font-bold text-lg",children:"Rp"})})}),(0,s.jsx)("div",{className:"flex-1",children:(0,s.jsx)(a.HG,{onValueChange:(e,l)=>{C(e.floatValue)},allowNegative:!1,placeholder:"0",value:y,name:"amount",disabled:b,hidden:!1,className:"block w-full text-2xl font-bold text-gray-800 bg-transparent border-0 focus:ring-0 focus:outline-none placeholder-gray-400",required:!0,allowLeadingZeros:!1,thousandSeparator:".",decimalSeparator:","})})]})}),(0,s.jsx)("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4",children:(0,s.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,s.jsx)("div",{className:"flex-shrink-0",children:(0,s.jsx)("svg",{className:"w-5 h-5 text-amber-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),(0,s.jsx)("div",{children:(0,s.jsx)("p",{className:"text-sm font-medium text-amber-800",children:"Minimal topup sebesar Rp. 10.
1000"})})]})})]})]})})}),(0,s.jsxs)("div",{className:"px-6 mb-8",children:[(0,s.jsxs)("div",{className:"flex items-center justify-center space-x-4 mb-6",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-gradient-to-r from-transparent via-gray-300 to-transparent"}),(0,s.jsxs)("div",{className:"flex items-center space-x-2 bg-white/80 backdrop-blur-sm px-4 py-2 rounded-full shadow-sm",children:[(0,s.jsx)("svg",{className:"w-5 h-5 text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})}),(0,s.jsx)("span",{className:"text-sm font-semibold text-gray-700",children:"Metode Pembayaran"})]}),(0,s.jsx)("div",{className:"flex-1 h-px bg-gradient-to-r from-transparent via-gray-300 to-transparent"})]}),!0===t?(0,s.jsx)("div",{className:"flex justify-center py-12",children:(0,s.jsx)(d.default,{})}):(0,s.jsx)("div",{className:"bg-white/90 backdrop-blur-lg rounded-2xl shadow-lg border border-white/20 p-6 hover:shadow-xl transition-all duration-300",children:(0,s.jsx)(o.A,{icon:null==v?void 0:v.thumbnail,title:null==v?void 0:v.title,onClick:e=>{e.preventDefault(),g(!0)},buttonTitle:"Ganti",enableWallet:b})})]})]}),(0,s.jsx)(u.A,{recurring:b}),(0,s.jsx)(h,{isOpen:p,onClose:()=>g(!1)})]})}},83332:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/wallets/topup",function(){return t(37165)}])}},e=>{e.O(0,[8096,2076,636,8792],()=>e(e.s=83332)),_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.