import{G as b,R as z,r as h,W as x,H as R,I as v,J as _,aB as E,P as L,Q as g,ao as G,au as H,ap as k,N as f}from"./common.modules-cecf9b0d.js";import{E as S}from"./page-activity-Bonus-c94a181e.js";import{M as V}from"./MayrecordList-6a5c04fc.js";import{A as q,ei as D,_ as K}from"./page-activity-ActivityDetail-6713f46c.js";const $={class:"MyGameRecord__C"},J={key:0,class:"MyGameRecord__C-head"},Q={class:"MyGameRecord__C-body"},W={key:1,class:"MyGameRecord__C-body-empty"},F={key:1,class:"MyGameRecord__C-foot"},U={class:"MyGameRecord__C-foot-page"},X=b({__name:"MyGameRecord",props:{typeid:{type:Number,required:!0},goPathName:{type:String,required:!0},hasHead:{type:Boolean,required:!0,default:!0}},setup(w,{expose:N}){const M=w,A=z(),C=h(4),I=h(20),m=h(1),u=h([]),B=c=>{A.push({name:c})},P=()=>{m.value--,y()},j=()=>{m.value++,y()},y=async(c=!1)=>{if(M.typeid==null)return;c&&(m.value=1);const n=await q(D({pageSize:I.value,pageNo:m.value,typeId:M.typeid})),s=(n==null?void 0:n.data.list)||[];for(let o=0;s.length>o;o++){let i=s[o].gameType.split(","),e=s[o].selectType.split(",");for(let l=0;i.length>l;l++)if(i[l]=="1"||i[l]=="2"||i[l]=="3")s[o].gameType="1",s[o].oneList=e;else if(i[l]=="5"||i[l]=="6"){let p=[],d=[],r=[];for(let t=0;e.length>t;t++){if(e[t]=="|11|"||e[t]=="|22|"||e[t]=="|33|"||e[t]=="|44|"||e[t]=="|55|"||e[t]=="|66|"){let a=e[t].split("|");a.pop(),a.shift(),p.push(a.join())}if(e[t]==":11:"||e[t]==":22:"||e[t]==":33:"||e[t]==":44:"||e[t]==":55:"||e[t]==":66:"){let a=e[t].split(":");a.pop(),a.shift(),d.push(a.join())}if(e[t]==":1:"||e[t]==":2:"||e[t]==":3:"||e[t]==":4:"||e[t]==":5:"||e[t]==":6:"){let a=e[t].split(":");a.pop(),a.shift(),r.push(a.join())}}s[o].gameType="2",s[o].oneList=p,s[o].towList=T(d,r)}else if(i[l]=="7"||i[l]=="8"){let p=[],d=!1;for(let r=0;e.length>r;r++){if(e[r]=="|111|"||e[r]=="|222|"||e[r]=="|333|"||e[r]=="|444|"||e[r]=="|555|"||e[r]=="|666|"){let t=e[r].split("|");t.pop(),t.shift(),p.push(t.join())}e[r]=="|AAA|"&&(d=!0),s[o].oneList=p,s[o].towList=d,s[o].gameType="3"}}else if(i[l]=="9"||i[l]=="10"||i[l]=="4"){let p=[],d=!1,r=[];for(let t=0;e.length>t;t++){if(e[t]=="|1|"||e[t]=="|2|"||e[t]=="|3|"||e[t]=="|4|"||e[t]=="|5|"||e[t]=="|6|"){let a=e[t].split("|");a.pop(),a.shift(),p.push(a.join())}if(e[t]=="|ABC|"&&(d=!0),e[t]==".1."||e[t]==".2."||e[t]==".3."||e[t]==".4."||e[t]==".5."||e[t]==".6."){let a=e[t].split(".");a.pop(),a.shift(),r.push(a.join())}}s[o].oneList=p,s[o].towList=d,s[o].threeList=r,s[o].gameType="4"}}u.value=s||[],C.value=(n==null?void 0:n.data.totalPage)||0},T=(c,n)=>{let s=[];for(var o=0;c.length>o;o++){let e=c[o],l=[];for(var i=0;n.length>i;i++)l.push(n[i]);if(l.length>0){let p=l.sort().join(",");s.push(e+"|"+p)}}return s.sort()};return N({getData:y}),x(()=>{y()}),(c,n)=>{const s=R("svg-icon"),o=R("van-icon");return f(),v("div",$,[c.hasHead?(f(),v("div",J,[_("div",{class:"MyGameRecord__C-head-moreB",onClick:n[0]||(n[0]=i=>B(c.goPathName))},[E(L(c.$t("more"))+" ",1),g(s,{name:"rightCircle"})])])):G("v-if",!0),_("div",Q,[u.value.length?(f(),H(V,{key:0,mayrecord:u.value},null,8,["mayrecord"])):(f(),v("div",W,[g(S)]))]),u.value.length?(f(),v("div",F,[_("div",{class:k(["MyGameRecord__C-foot-previous",{disabled:m.value<=1}]),onClick:P},[g(o,{name:"arrow-left",class:"MyGameRecord__C-icon",size:"20"})],2),_("div",U,L(m.value)+"/"+L(C.value),1),_("div",{class:k(["MyGameRecord__C-foot-next",{disabled:m.value>=C.value}]),onClick:j},[g(o,{name:"arrow",class:"MyGameRecord__C-icon",size:"20"})],2)])):G("v-if",!0)])}}});const te=K(X,[["__scopeId","data-v-cffd8c9f"],["__file","/usr/local/jenkins-prod/workspace/ar051-india-tiranga/src/components/Home/AllLotteryGames/K3/MyGameRecord.vue"]]);export{te as M};