1import{l as _,r as y,A as e,S as c,B as h}from"./index.3a9dafa4.1791296062701.js";import{u as v,r as g}from"./agentation.f767b108.1791296062701.js";import{f as B,b as C,r as F,u as N}from"./user-slice.233305f5.1791296062701.js";import{v as w,V as L}from"./index-layout-lite.8c3896ff.1791296062701.js";import"./usePreloadTheme.3f46834b.1791296062701.js";import"./staticContentModules.e9474029.1791296062701.js";import"./luckyWheelModules.004453d6.1791296062701.js";import"./ms-hook.2c2a78d3.1791296062701.js";const T="_fundsContainer_e74e9_9",A="_headerText_e74e9_14",V="_walletCard_e74e9_20",W="_cardHeader_e74e9_27",E="_title_e74e9_32",D="_fakeSeamlessContainer_e74e9_35",R="_label_e74e9_39",$="_checkBox_e74e9_43",G="_checkBtn_e74e9_52",M="_isEnabled_e74e9_65",H="_cardBody_e74e9_72",U="_cardBalance_e74e9_77",P="_amount_e74e9_81",Y="_isAmountLoading_e74e9_87",I="_restoreBtn_e74e9_91",q="_icon_e74e9_113",z="_actions_e74e9_119",J="_btn_e74e9_123",a={fundsContainer:T,headerText:A,walletCard:V,cardHeader:W,title:E,fakeSeamlessContainer:D,label:R,checkBox:$,checkBtn:G,isEnabled:M,cardBody:H,cardBalance:U,amount:P,isAmountLoading:Y,restoreBtn:I,icon:q,actions:z,btn:J,"skeleton-loading-effect":"_skeleton-loading-effect_e74e9_1"},K=s=>{const l=_.useSelector(t=>{const i=t.user?.isLogin,d=t.user?.account?.currency,u=t.language?.currentLanguage?.currency;return((i&&d||u)??"").toString().toUpperCase()}),n=window?.portalSettings?.liteFeatures?.[s];if(!n)return!1;if(n.enable===!0)return!0;const o=Array.isArray(n.enableByCurrency)?n.enableByCurrency:[];for(let t=0;t<o.length;t++)if(String(o[t]).toUpperCase()===l)return!0;return!1},ne=()=>{const{t:s}=v(["liteFunds"]),l=g.useHistory(),n=_.useDispatch(),{walletBalance:o,hasFakeSeamless:t,isFakeSeamlessDisabled:i,isWalletLoading:d}=_.useSelector(r=>r.wallet),u=_.useSelector(r=>r.user?.account?.currency),f=K("instantRebate"),[b,x]=y.useState(!1),{triggerVerification:p}=w();y.useEffect(()=>{n(B()),n(C())},[n]);const m=r=>{r==="/myaccount/withdraw"?p().then(k=>{if(k){x(!0);return}else l.push(r)}):l.push(r)},S=async()=>{await n(F(t)).unwrap()},j=()=>{n(N({hasFakeSeamless:t,isFakeSeamlessDisabled:!i})).unwrap().then(r=>{r.isFakeSeamlessDisabled?h.toast.success(s("liteFunds:fakeSeamlessDisabled","You have disabled Auto Transfer. Please allow up to 5 minutes for the system to update your preferences. Thank you.")):h.toast.success(s("liteFunds:fakeSeamlessEnabled","You have enabled Auto Transfer. Please allow up to 5 minutes for the system to update your preferences. Thank you."))}).catch(()=>{h.toast.error(s("liteFunds:error.updateFailedFakeSeamless","Unable to update auto transfer status. Please try again later."))})};return e.jsxs("div",{className:a.fundsContainer,children:[e.jsx("div",{className:a.headerText,children:s("liteFunds:Fund","Fund")}),e.jsxs("div",{className:a.walletCard,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx("div",{className:a.title,children:s("liteFunds:yourWallet","Your Wallet")}),e.jsx("div",{className:a.fakeSeamlessContainer,children:t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:a.label,children:s("liteFunds:mainWalletAutoTransfer","Main Wallet Auto Transfer")}),e.jsx("div",{className:`${a.checkBox} ${i?"":a.isEnabled}`,onClick:j,children:e.jsx("div",{className:a.checkBtn})})]})})]}),e.jsxs("div",{className:a.cardBody,children:[e.jsxs("div",{className:a.cardBalance,children:[e.jsxs("div",{className:a.title,children:[s("liteFunds:totalBalance","Total Balance"),"(",u||"",")"]}),e.jsx("div",{className:`${a.amount} ${d?a.isAmountLoading:""}`,children:o??""})]}),e.jsxs("button",{className:a.restoreBtn,onClick:S,disabled:d,children:[e.jsx("div",{className:a.label,children:s("liteFunds:restoreWallet","Restore Wallet")}),e.jsx("div",{className:a.icon,children:e.jsx(c,{category:"SVGMyAcc",name:"D-restore"})})]})]})]}),e.jsxs("div",{className:a.actions,children:[e.jsxs("div",{className:`${a.btn}`,onClick:()=>m("/myaccount/deposit"),children:[e.jsx(c,{category:"SVGLiteNav",name:"deposit"}),s("liteFunds:deposit","Deposit")]}),e.jsxs("div",{className:`${a.btn}`,onClick:()=>m("/myaccount/transfer"),children:[e.jsx(c,{category:"SVGLiteNav",name:"transfer"}),s("liteFunds:transfer","Transfer")]}),e.jsxs("div",{className:`${a.btn}`,onClick:()=>m("/myaccount/withdraw"),children:[e.jsx(c,{category:"SVGLiteNav",name:"withdraw"}),s("liteFunds:withdraw","Withdraw")]}),f&&e.jsxs("div",{className:`${a.btn}`,onClick:()=>m("/myaccount/instant-rebate"),children:[e.jsx(c,{category:"SVGLiteNav",name:"rebate"}),s("liteFunds:rebate","Rebate")]})]}),b&&e.jsx(L,{setVerificationModal:x})]})};export{ne as default};
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.