import{U as F,O as J,P as X,$ as Y,r as y,E as Z,V as B,m as r,p as e,Z as p,M as t,Y as s,ac as j,J as N,W as P,X as U,o as c,ag as Q}from"./common.modules-219f1756.js";import{d as ee,G as te,k as ae,a5 as se,b_ as ne,A as V,dq as le,dr as oe,c0 as re,c as f,g as ce}from"./page-activity-ActivityDetail-346b11b6.js";window.getBuildInfo=function(){return{buildTime:"3/15/2025, 9:01:28 PM",branch:" commitId:c8ca98fce6fc864cab311715d288030620d0dc9f"}};const ie={class:"wallet-container"},ue={class:"wallet-container-header"},de={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"},ge={class:"progressBarsL"},ye={class:"progressBarsR"},fe={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=F({__name:"index",setup(E){ee();const R=te(),C=J(()=>R.userInfo),{downAppTip:K}=ae(),O=re(),{t:l}=X(),L=Y(),{setLoading:g}=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"}},q=async a=>{a=="Recharge"||a=="Withdraw"?await K(a):(a==="RechargeHistory"&&O.emit("changeKeepAliveKey"),L.push({name:a}))};let k=y([]),h=0,v=0,i=0,D="0%",_=0,u=0,T="0%";const W=new Date().getTime()/1e3,A=y(0),x=y(0),d=y(0);async function M(){g(!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)),g(!1)}async function z(){if(d.value)return;const a=await V(oe());a?(d.value=5,h=a.data.amount,G()):d.value=0}const G=async()=>{if(d.value==0){g(!0),await M(),g(!1);return}setTimeout(()=>{d.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?(i=Math.round(v/h*1e4)/100,u=Math.round(_/h*1e4)/100,D=i+"%",T=u+"%"):(i=0,u=0)}return Z(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 c(),r("div",ie,[e("div",ue,[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",de,[p(S,{name:"wallet1"}),e("div",null,s(t(f)(t(h))),1),e("span",null,s(t(l)("totalBalance")),1),C.value.isShowWalletTotalCT=="1"?(c(),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)])])):j("v-if",!0)])]),e("div",_e,[e("div",we,[e("div",pe,[e("div",ge,[p(I,{"current-rate":t(i),"onUpdate:currentRate":o[1]||(o[1]=n=>N(i)?i.value=n:i=n),speed:100,text:t(D),"stroke-width":"100","stroke-linecap":"butt"},null,8,["current-rate","text"]),e("h3",null,s(t(f)(t(v))),1),e("span",null,s(t(l)("mainWallet")),1)]),e("div",ye,[p(I,{"current-rate":t(u),"onUpdate:currentRate":o[2]||(o[2]=n=>N(u)?u.value=n:u=n),speed:100,text:t(T),"stroke-width":"100","stroke-linecap":"butt"},null,8,["current-rate","text"]),e("h3",null,s(t(f)(t(_))),1),e("span",null,s(t(l)("thirdPartyWallet")),1)])]),e("div",fe,[d.value==0?(c(),r("button",{key:0,class:"recycleBtn",onClick:z},s(t(l)("oneClickRecovery")),1)):(c(),r("button",ke,s(t(l)("recycling"))+" "+s(d.value),1))]),e("div",be,[(c(),r(P,null,U($,(n,b)=>e("div",{key:b,onClick:We=>q(n.link)},[e("div",Re,[e("img",{src:t(ce)("wallet",n.icon)},null,8,Ce)]),e("span",null,s(n.title),1)],8,Be)),64))])]),t(k)?(c(),r("div",Le,[(c(!0),r(P,null,U(t(k),(n,b)=>(c(),r("div",{class:Q(["box",n.balance>0?"select":""]),key:b},[p(S,{name:n.vendorCode},null,8,["name"]),e("h3",De,s(t(f)(n.balance," ")),1),e("span",null,s(n.vendorCode.replace("G9","9G")),1)],2))),128))])):(c(),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-14666ffc.js.map
