import{r as g,br as s,dm as B,b7 as C,u as M,O as x,aS as k,aT as c,bf as H,a$ as a,aY as r,bg as y,bh as D,c as v,bc as L,b0 as e,ba as i,N as $,a_ as N,aX as F}from"./index-xnhGKCfe.js";import{c as b}from"./currency-DTUBf2lI.js";import{P as I}from"./index-97-mhYEo.js";import{_ as P}from"./index.vue_vue_type_style_index_0_lang-9szultRB.js";import"./pre-D84pmYLY.js";import"./useProtocol-DJp7lFWi.js";function U(){const m=g([]),t=g([s().startOf("day"),s().endOf("day")]),f=l=>{switch(l){case 0:t.value=[s().startOf("day"),s().endOf("day")];break;case 1:t.value=[s().subtract(1,"day").startOf("day"),s().subtract(1,"day").endOf("day")];break;case 2:t.value=[s().startOf("week"),s().endOf("week")];break;case 3:t.value=[s().startOf("month"),s().endOf("month")];break}_()},_=async()=>{const{code:l,data:u}=await B({startDateTime:t.value[0].format("YYYY-MM-DD HH:mm:ss"),endDateTime:t.value[1].format("YYYY-MM-DD HH:mm:ss")});l===0&&l===0&&(m.value=u)};return{StatisticsList:m,SelectDate:f,getStatisticsData:_}}const V={class:"game-stats-page"},j={class:"time-tabs"},z=["onClick"],E={class:"total-bet-card"},G={class:"total-label"},R={class:"total-amount"},W={class:"game-categories"},X={class:"category-header"},q={class:"category-icon"},A={class:"category-name"},J={class:"category-details"},K={class:"detail-row"},Q={class:"detail-label"},Z={class:"detail-value"},tt={class:"detail-row"},at={class:"detail-label"},st={class:"detail-value"},et={class:"detail-row"},ot={class:"detail-label"},ct={class:"detail-value win"},it=C({__name:"index",setup(m){const{t}=M(),{SelectDate:f,getStatisticsData:_,StatisticsList:l}=U(),u=g(0),O=v(()=>[t("t413"),t("t414"),t("t388"),t("t415")]),w=v(()=>[t("t402"),t("t404"),t("t403"),t("t365"),t("t401")]),h=v(()=>l.value||[]),S=v(()=>h.value.reduce((n,p)=>n+(p.totalBet||0),0).toFixed(2)),T=n=>{u.value=n,f(n)};return x(()=>_()),(n,p)=>{const Y=N;return c(),k(I,null,{default:H(()=>[a("div",V,[a("div",j,[(c(!0),r(y,null,D(O.value,(o,d)=>(c(),r("div",{key:d,class:L([{active:u.value===d},"time-tabs-item"]),onClick:lt=>T(d)},e(o),11,z))),128))]),h.value.length>0?(c(),r(y,{key:0},[a("div",E,[a("div",G,e(i(t)("t316")),1),a("div",R,e(i(b)(S.value)),1)]),a("div",W,[(c(!0),r(y,null,D(h.value,(o,d)=>(c(),r("div",{key:d,class:"category-card"},[a("div",X,[a("div",q,[$(Y,{name:"icon_statistics"+o.categoryType,iconClass:"lottery"},null,8,["name"])]),a("div",A,e(w.value[o.categoryType]),1)]),a("div",J,[a("div",K,[a("div",Q,e(i(t)("t316")),1),a("div",Z,e(i(b)(o.totalBet)),1)]),a("div",tt,[a("div",at,e(i(t)("t499")),1),a("div",st,e(o.betOrderCount),1)]),a("div",et,[a("div",ot,e(i(t)("t500")),1),a("div",ct,e(i(b)(o.totalWin)),1)])])]))),128))])],64)):(c(),k(P,{key:1,class:"empty"}))])]),_:1})}}}),mt=F(it,[["__scopeId","data-v-f3560bd6"]]);export{mt as default};
