import{_ as a,c as e,b as s,aw as l}from"./common-store-kFD1YPwN.js";import{a8 as t,a7 as n,q as r,F as o}from"./common-utils-RDWuRZ1M.js";import{q as c}from"./wallet.api-iEDbrB2H.js";import{H as i}from"./Header-X_QfKFhH.js";import{S as m}from"./SvgIcon-a1Rg7hQY.js";import{U as v,a4 as u,r as d,j as y,s as b,b as p,q as f,I as g,u as x,h,F as W,e as j,t as w,o as S,n as _}from"./vendor-jA_NIjzi.js";import"./vendor-mqtt-lYGapirz.js";import"./vendor-crypto-Vtl7-GZS.js";/* empty css              */const k={class:"myWallet",id:"myWallet"},I={class:"right"},q={class:"content"},A={class:"myWallet-box-left"},C={class:"myWallet-box-left-money"},G={class:"text"},F={class:"str"},H={class:"myWallet-box-right"},L={class:"myWallet-box"},N={class:"myWallet-box-money"},U={class:"text"},B={class:"moneyStr"},D={class:"myWallet-box-money"},E={class:"text"},P={class:"moneyStr"},R={class:"myWallet-text"},T={class:"myWallet-table-name"},z={class:"myWallet-table-money"},J=a({__name:"index",setup(a){const{t:J}=v(),K=u(),M=e(),O=s(),Q=d(!1),V=d(!1),X=d([]),Y=d({}),Z=d(0),$=()=>{r()?o("customerCenter"):K.push("/customerService")},aa=[{id:0,name:J("场馆名称")},{id:1,name:J("钱包余额")}];y((async()=>{await ea()}));const ea=async()=>{if(Q.value)return b({message:J("请勿重复点击10秒后可再操作")});Q.value=!0,V.value=!1,Z.value=0;const a=await t();if(!a.success)return a.message&&b(a.message),void(V.value=!0);await M.recycleBalance(),V.value=!0},sa=()=>{V.value&&(Q.value=!1,V.value=!1),(async()=>{var a,e,s,t;try{const n=await Promise.allSettled([c(M.platformCurrencyInfo.currencyAbbr),l()]);if(!n[1].value.success)return n[1].value.message&&b(n[1].value.message);Y.value=null!=(e=null==(a=n[0].value)?void 0:a.data)?e:{},X.value=null!=(t=null==(s=n[1].value)?void 0:s.data)?t:[],X.value.forEach((a=>Z.value+=Number(a.balance))),O.clearGlobalLoading()}catch(n){if(n.message)return O.clearGlobalLoading(),b(n.message)}})()};return(a,e)=>{var s,l,t,r;return S(),p("div",k,[f(i,{title:x(J)("我的钱包"),isRightShow:!1},{right:g((()=>[h("div",I,[f(m,{name:"refresh",class:_(["my-svg",{refresh:Q.value}]),onClick:ea,onAnimationiteration:sa},null,8,["class"]),f(m,{class:"service-svg svg-icon",name:"service",onClick:$})])])),_:1},8,["title"]),h("div",q,[(S(!0),p(W,null,j(null!=(l=null==(s=x(M))?void 0:s.walletInfo.filter((a=>"USDT"===a.currencyAbbr)))?l:[],(a=>(S(),p("div",{class:"myWallet-box",key:a.id},[h("div",A,[h("div",C,[h("span",G,w(x(J)("总金额")),1),h("span",F,w(a.currencyAbbr),1)])]),h("div",H,w(x(n)(a.balance)),1)])))),128)),h("div",L,[h("div",N,[h("span",U,w(x(J)("中心钱包")),1),h("span",B,w(x(n)(null!=(r=null==(t=Y.value)?void 0:t.balance)?r:0)),1)]),h("div",D,[h("span",E,w(x(J)("游戏钱包")),1),h("span",P,w(x(n)(Z.value)),1)])]),h("div",R,[(S(),p(W,null,j(aa,(a=>h("div",{key:a.id},w(a.name),1))),64))]),(S(!0),p(W,null,j(X.value,(a=>(S(),p("div",{class:"myWallet-table",key:a.id},[h("div",T,w(a.thirdGameName),1),h("div",z,w(a.balance),1)])))),128))])])}}},[["__scopeId","data-v-dd1d9ce3"],["__file","index.vue"]]);export{J as default};
