import{V as O,P as Q,Q as X,a0 as Y,r as y,F as Z,W as B,m as r,p as e,$ as p,N as t,Z as s,ad as q,K as N,X as P,Y as U,o as i,aj as J}from"./common.modules-adc6b33e.js";import{d as ee,G as te,k as ae,a4 as se,c1 as ne,A as V,dx as le,dy as oe,c3 as re,c as f,g as ie}from"./page-activity-ActivityDetail-b9249b49.js";window.getBuildInfo=function(){return{buildTime:"4/17/2025, 12:09:57 PM",branch:" commitId:8bf9f27a915f5dcd9b9436e446b585b05218b863"}};const ce={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"},be={key:1,class:"recycleBtn disable"},ke={class:"userDetail"},Be=["onClick"],Re={class:"imgD"},Ce=["src"],Le={key:0,class:"gameList"},De={class:"money"},Te={key:1,class:"gameList"},Ge=O({__name:"index",setup(K){ee();const R=te(),C=Q(()=>R.userInfo),{downAppTip:E}=ae(),F=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"}},j=async a=>{a=="Recharge"||a=="Withdraw"?await E(a):(a==="RechargeHistory"&&F.emit("changeKeepAliveKey"),L.push({name:a}))};let b=y([]),h=0,v=0,c=0,D="0%",_=0,u=0,T="0%";const W=new Date().getTime()/1e3,x=y(0),A=y(0),d=y(0);async function G(){g(!0);const a=await V(le());a&&(m.setTimestampLast(W),m.setAllwallets(a==null?void 0:a.data),M(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,H()):d.value=0}const H=async()=>{if(d.value==0){g(!0),await G(),g(!1);return}setTimeout(()=>{d.value-=1,H()},1e3)};function M(a){if(!a)return;C.value.isShowWalletTotalCT=="1"&&(x.value=a.totalWithdraw||0,A.value=a.totalRecharge||0),b.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,u=Math.round(_/h*1e4)/100,D=c+"%",T=u+"%"):(c=0,u=0)}return Z(async()=>{m.getTimestampLast==0||W-m.getTimestampLast>=6?await G():M(m.getAllwallets)}),(a,o)=>{const w=B("NavBar"),S=B("svg-icon"),I=B("van-circle");return i(),r("div",ce,[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"?(i(),r("div",he,[e("div",null,[e("p",me,s(x.value),1),e("p",null,s(t(l)("totalWithdraw")),1)]),e("div",null,[e("p",ve,s(A.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",ge,[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(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?(i(),r("button",{key:0,class:"recycleBtn",onClick:z},s(t(l)("oneClickRecovery")),1)):(i(),r("button",be,s(t(l)("recycling"))+" "+s(d.value),1))]),e("div",ke,[(i(),r(P,null,U($,(n,k)=>e("div",{key:k,onClick:We=>j(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(b)?(i(),r("div",Le,[(i(!0),r(P,null,U(t(b),(n,k)=>(i(),r("div",{class:J(["box",n.balance>0?"select":""]),key:k},[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))])):(i(),r("div",Te,[e("div",null,s(t(l)("noData")),1)]))])])}}});export{Ge as _};
//# sourceMappingURL=page-wallet-index.vue_vue_type_script_setup_true_lang.ts-eccc907a.js.map
