import{U as J,O as X,P as Y,$ as Z,r as g,E as j,V as B,m as r,p as e,Z as p,M as t,Y as s,ad as q,J as N,W as P,X as U,o as i,ah as Q}from"./common.modules-7ef9f935.js";import{d as ee,G as te,k as ae,a5 as se,c2 as ne,A as V,dv as le,dw as oe,c4 as re,c as y,g as ie}from"./page-activity-ActivityDetail-6651511c.js";window.getBuildInfo=function(){return{buildTime:"3/28/2025, 7:06:51 PM",branch:"origin/masterBranch/main commitId:afb5d46f657248d3137decf21a49f44fbff20383"}};const ce={class:"wallet-container"},de={class:"wallet-container-header"},ue={class:"wallet-container-header-belly"},he={key:0},me={class:"total"},ve={class:"total"},_e={class:"wallet-container-content"},we={class:"container"},pe={class:"progressBars"},fe={class:"progressBarsL"},ge={class:"progressBarsR"},ye={class:"recycleBtnD"},ke={key:1,class:"recycleBtn disable"},be={class:"userDetail"},Be=["onClick"],Re={class:"imgD"},Ce=["src"],Le={key:0,class:"gameList"},De={class:"money"},Te={key:1,class:"gameList"},Me=J({__name:"index",setup(E){ee();const R=te(),C=X(()=>R.userInfo),{downAppTip:K}=ae(),O=re(),{t:l}=Y(),L=Z(),{setLoading:f}=se(),m=ne(),$={recharge:{title:l("recharge"),icon:"rechargeIcon",link:"Recharge"},withdraw:{title:l("withdraw"),icon:"widthdrawBlue",link:"Withdraw"},rechargeHistory:{title:l("rechargeRecords"),icon:"rechargeHistory",link:"RechargeHistory"},withdrawHistory:{title:l("withdrawRecords"),icon:"withdrawHistory",link:"WithdrawHistory"}},z=async a=>{a=="Recharge"||a=="Withdraw"?await K(a):(a==="RechargeHistory"&&O.emit("changeKeepAliveKey"),L.push({name:a}))};let k=g([]),h=0,v=0,c=0,D="0%",_=0,d=0,T="0%";const W=new Date().getTime()/1e3,A=g(0),x=g(0),u=g(0);async function M(){f(!0);const a=await V(le());a&&(m.setTimestampLast(W),m.setAllwallets(a==null?void 0:a.data),H(a==null?void 0:a.data)),f(!1)}async function F(){if(u.value)return;const a=await V(oe());a?(u.value=5,h=a.data.amount,G()):u.value=0}const G=async()=>{if(u.value==0){f(!0),await M(),f(!1);return}setTimeout(()=>{u.value-=1,G()},1e3)};function H(a){if(!a)return;C.value.isShowWalletTotalCT=="1"&&(A.value=a.totalWithdraw||0,x.value=a.totalRecharge||0),k.value=a.thidGameBalanceList||[];let o=a.thidGameBalanceList||[];if(v=0,_=0,o)for(var w of o)w.vendorCode==="Lottery"?v+=w.balance:_+=w.balance;h=v+_,h>0?(c=Math.round(v/h*1e4)/100,d=Math.round(_/h*1e4)/100,D=c+"%",T=d+"%"):(c=0,d=0)}return j(async()=>{m.getTimestampLast==0||W-m.getTimestampLast>=6?await M():H(m.getAllwallets)}),(a,o)=>{const w=B("NavBar"),S=B("svg-icon"),I=B("van-circle");return i(),r("div",ce,[e("div",de,[p(w,{title:t(l)("wallet"),class:"main","left-arrow":"",onClickLeft:o[0]||(o[0]=n=>t(L).go(-1))},null,8,["title"]),e("div",ue,[p(S,{name:"wallet1"}),e("div",null,s(t(y)(t(h))),1),e("span",null,s(t(l)("totalBalance")),1),C.value.isShowWalletTotalCT=="1"?(i(),r("div",he,[e("div",null,[e("p",me,s(A.value),1),e("p",null,s(t(l)("totalWithdraw")),1)]),e("div",null,[e("p",ve,s(x.value),1),e("p",null,s(t(l)("totalRechargeAmount")),1)])])):q("v-if",!0)])]),e("div",_e,[e("div",we,[e("div",pe,[e("div",fe,[p(I,{"current-rate":t(c),"onUpdate:currentRate":o[1]||(o[1]=n=>N(c)?c.value=n:c=n),speed:100,text:t(D),"stroke-width":"100","stroke-linecap":"butt"},null,8,["current-rate","text"]),e("h3",null,s(t(y)(t(v))),1),e("span",null,s(t(l)("mainWallet")),1)]),e("div",ge,[p(I,{"current-rate":t(d),"onUpdate:currentRate":o[2]||(o[2]=n=>N(d)?d.value=n:d=n),speed:100,text:t(T),"stroke-width":"100","stroke-linecap":"butt"},null,8,["current-rate","text"]),e("h3",null,s(t(y)(t(_))),1),e("span",null,s(t(l)("thirdPartyWallet")),1)])]),e("div",ye,[u.value==0?(i(),r("button",{key:0,class:"recycleBtn",onClick:F},s(t(l)("oneClickRecovery")),1)):(i(),r("button",ke,s(t(l)("recycling"))+" "+s(u.value),1))]),e("div",be,[(i(),r(P,null,U($,(n,b)=>e("div",{key:b,onClick:We=>z(n.link)},[e("div",Re,[e("img",{src:t(ie)("wallet",n.icon)},null,8,Ce)]),e("span",null,s(n.title),1)],8,Be)),64))])]),t(k)?(i(),r("div",Le,[(i(!0),r(P,null,U(t(k),(n,b)=>(i(),r("div",{class:Q(["box",n.balance>0?"select":""]),key:b},[p(S,{name:n.vendorCode},null,8,["name"]),e("h3",De,s(t(y)(n.balance," ")),1),e("span",null,s(n.vendorCode.replace("G9","9G")),1)],2))),128))])):(i(),r("div",Te,[e("div",null,s(t(l)("noData")),1)]))])])}}});export{Me as _};
//# sourceMappingURL=page-wallet-index.vue_vue_type_script_setup_true_lang.ts-e0f4b938.js.map
