import{C as G,v as $,r as i,N as z,w as D,y as F,D as v,E as l,M as c,J as T,as as h,F as a,G as C,H as w,I as r,am as V,K as d,ay as M}from"./common.modules-7b90237f.js";import{N as S}from"./page-home-AllGames-7e10dae9.js";import{A as j,aE as H,ci as J,_ as K}from"./page-activity-ActivityDetail-27bd7cf0.js";import"./page-turntable-assets-d6267459.js";import"./native/index-ecf1462d.js";import"./en-91d2fc72.js";const O={class:"x-page"},U={class:"x-page-list"},q={class:"title"},P={class:"box"},Q={class:"sum"},W={class:"num"},X=G({__name:"index",setup(Y){const{t:s}=$(),k=i(null),m=i(0),_=i(0),L=e=>{_.value=e.item.codeType,window.scroll({top:0})},x=e=>parseFloat(e),N=z(),R=[{name:s("lottery"),img:"lottery",id:1,codeType:0},{name:s("live"),img:"video",id:6,codeType:2},{name:s("sport"),img:"sport",id:5,codeType:3},{name:s("chess"),img:"chess",id:7,codeType:4},{name:s("electric"),img:"slot",id:4,codeType:1}],n=i([{type:"rebateratelist",title:s("commissionTitle1"),content:[]},{type:"dianzilist",title:s("commissionTitle2"),content:[]},{type:"shixunlist",title:s("commissionTitle3"),content:[]},{type:"tiyulist",title:s("commissionTitle4"),content:[]},{type:"chesslist",title:s("commissionTitle5"),content:[]}]),y=D([]);let f=i([]);const I=async()=>{const e=await j(H());e&&(e.data.forEach(t=>{t.state===1&&y.push({id:t.id,isShow:t.state===1,title:s("code"+t.typeNameCode),img:t.categoryImg,key:t.categoryCode.toLocaleLowerCase()})}),f.value=R.filter(t=>y.some(u=>t.id===u.id)))},B=async()=>{try{const e=await J();n.value[0].content=e.rebateratelist,n.value[1].content=e.dianzilist,n.value[2].content=e.shixunlist,n.value[3].content=e.tiyulist,n.value[4].content=e.chesslist}catch{}};return F(()=>{B(),I()}),(e,t)=>{const u=v("NavBar"),b=v("svg-icon"),A=v("van-sticky");return r(),l("div",O,[c(u,{title:e.$t("rebateRatio"),"left-arrow":"",onClickLeft:t[0]||(t[0]=o=>T(N).go(-1))},null,8,["title"]),c(A,{"offset-top":46,container:k.value,class:"bet-container-sticky"},{default:h(()=>[a("div",null,[c(S,{list:T(f),active:m.value,"onUpdate:active":t[1]||(t[1]=o=>m.value=o),tabClassName:"tabs",onOnClickTab:L,activeClassName:"tab_active",ref:"tabRefs",tabItemClassName:"funtab_item"},{default:h(({item:o,index:p})=>[a("div",{class:V(["tab_item",{tab_active:p===m.value}])},[c(b,{name:o.img},null,8,["name"]),a("span",null,d(o.name),1)],2)]),_:1},8,["list","active"])])]),_:1},8,["container"]),a("div",U,[(r(!0),l(C,null,w(n.value[_.value].content,(o,p)=>(r(),l("div",{class:"item",key:p},[a("div",q,[M(d(e.$t("rebateLevel"))+" ",1),a("span",null,"L"+d(o.rebate_Lv),1)]),a("div",P,[(r(!0),l(C,null,w(o.rebateLevels,(g,E)=>(r(),l("div",{class:"li",key:E},[c(b,{name:"round",class:"img"}),a("div",null,[a("span",Q,d(e.$t("lowerRrebate",[g.levelId])),1),a("span",W,d(x(g.amount))+"%",1)])]))),128))])]))),128))])])}}});const ne=K(X,[["__scopeId","data-v-a6a0c110"],["__file","/usr/local/jenkins-prod/workspace/ar079-india-tashanwin/src/views/promotion/RebateRatio/index.vue"]]);export{ne as default};
