import{C as G,v as L,N as $,r as I,w as D,y as E,D as g,ax as H,E as c,M as _,J as i,F as e,as as F,K as o,ar as P,G as N,H as w,q as k,o as V,I as r,au as T}from"./common.modules-7b90237f.js";import{N as W,bv as y,bw as j,bx as z,c as h,g as B,_ as R}from"./page-activity-ActivityDetail-27bd7cf0.js";import{E as J}from"./page-activity-Bonus-9d46271c.js";import"./page-turntable-assets-d6267459.js";import"./native/index-ecf1462d.js";import"./en-91d2fc72.js";const s=W.global.t;s("lottery"),s("electronic"),s("sport"),s("live"),s("chess"),s("fishing"),s("miniGame");const K=[{name:s("chess"),type:5,icon:"iconChess",typeName:"chesscard"},{name:s("fishing"),type:3,icon:"iconFishing",typeName:"fish"},{name:s("electronic"),type:2,icon:"iconElectric",typeName:"electronic"},{name:s("lottery"),type:0,icon:"iconLottery",typeName:"lottery"},{name:s("sport"),type:4,icon:"iconPhysics",typeName:"sport"},{name:s("live"),type:5,icon:"iconRealPerson",typeName:"video"},{name:s("miniGame"),type:6,icon:"iconMiniGame",typeName:"smallgame"},{name:s("electronic"),type:2,icon:"iconSlots",typeName:"slot"}],U={class:"gamestats-container"},O={class:"gamestats-container-header"},Q={class:"gamestats-container-banner"},X={class:"gamestats-container-list-wrapper"},Z={key:1,class:"gamestats-container-items"},ee={alt:""},te={class:"gamestats-container-item-content"},ae={alt:""},se={class:"gamestats-container-item-content-list"},ne=G({__name:"index",setup(oe){const{t:m}=L(),A=$(),v=I(0),q=[{title:m("today"),records:"hello"},{title:m("yesterday"),records:"hello"},{title:m("thisWeek"),records:"hello"},{title:m("thisMonth"),records:"hello"}],p=a=>{let t={start:0,end:0};switch(a){case 0:t=y().today;break;case 1:t=y().yesterday;break;case 2:t=y().last7days;break;case 3:t=y().thisMonth;break}return{startDate:k(t.start*1e3).format("YYYY-MM-DD HH:mm:ss"),endDate:k(t.end*1e3).format("YYYY-MM-DD HH:mm:ss")}},u=D({startDate:p(0).startDate,endDate:p(0).endDate}),C=a=>{const t=K.find(d=>a.gameTypeName.toLowerCase()===d.typeName);return t==null?void 0:t.icon},l=D({list:[],sumBetAmount:0}),b=async()=>{const[a,t]=await j(z(u));a&&V({message:a.msg,wordBreak:"break-word"}),t&&(l.list=t.gameStatis,l.sumBetAmount=t.sumBetAmount)};E(()=>{b()});const M=a=>{u.startDate=p(a).startDate,u.endDate=p(a).endDate,b()};return(a,t)=>{const d=g("NavBar"),x=g("van-tab"),S=g("van-tabs"),f=H("lazy");return r(),c("div",U,[_(d,{title:a.$t("gameStats"),"left-arrow":"",onClickLeft:t[0]||(t[0]=n=>i(A).go(-1))},null,8,["title"]),e("div",O,[_(S,{active:v.value,"onUpdate:active":t[1]||(t[1]=n=>v.value=n),type:"card",onChange:M},{default:F(()=>[(r(),c(N,null,w(q,n=>_(x,{title:n.title},null,8,["title"])),64))]),_:1},8,["active"])]),e("div",Q,[e("h1",null,o(i(h)(l.sumBetAmount||0)),1),e("span",null,o(a.$t("totalBetAmount")),1)]),e("div",X,[l.list.length===0?(r(),P(J,{key:0,style:{"margin-top":"40px"}})):(r(),c("div",Z,[(r(!0),c(N,null,w(l.list,(n,Y)=>(r(),c("div",{class:"gamestats-container-item",key:Y},[e("h1",null,[T(e("img",ee,null,512),[[f,i(B)("main",C(n))]]),e("span",null,o(n.gameTypeName),1)]),e("div",te,[T(e("img",ae,null,512),[[f,i(B)("main","gameStatsSteps")]]),e("div",se,[e("div",null,[e("h4",null,o(a.$t("betAmount")),1),e("h5",null,o(i(h)(n.betAmount)),1)]),e("div",null,[e("h4",null,o(a.$t("betTimes")),1),e("h5",null,o(n.betCount),1)]),e("div",null,[e("h4",null,o(a.$t("winningAmount")),1),e("span",null,o(i(h)(n.betWinLossAmount)),1)])])])]))),128))]))])])}}});const de=R(ne,[["__scopeId","data-v-0fabbe57"],["__file","/usr/local/jenkins-prod/workspace/ar079-india-tashanwin/src/views/main/GameStats/index.vue"]]);export{de as default};
