import{r as c,X as v,dg as y,b7 as h,aS as f,aT as u,bf as m,N as R,ba as n,aB as w,a$ as s,b9 as L,aY as k,b0 as r,bg as b,bh as B,aX as N}from"./index-xnhGKCfe.js";import{L as x}from"./index-BCXnwPbG.js";import{P as S}from"./index-97-mhYEo.js";import{_ as $}from"./index.vue_vue_type_style_index_0_lang-9szultRB.js";import{c as C}from"./currency-DTUBf2lI.js";import"./use-tab-status-C1dTAhJi.js";import"./pre-D84pmYLY.js";import"./useProtocol-DJp7lFWi.js";function T(){const p={1:"Day Rank",2:"Week Rank",3:"Month Rank"},a=c([]),e=v({page:1,pageSize:10,total:0}),i=c(!1),l=c(!1);return{pageInfo:e,loading:i,finished:l,historyList:a,rankType:p,getRankRewardHistory:async()=>{try{i.value=!0;const{data:t,result:d}=await y({pageSize:e.pageSize,pageNo:e.page});d&&(a.value=[...a.value,...t.list||[]],a.value=t.list||[],e.page=t.pageNo||1,e.total=t.totalCount||0,++e.page)}finally{a.value.length>=e.total&&(l.value=!0),i.value=!1}}}}const z={class:"history-list"},A={class:"reward"},D=h({__name:"index",setup(p){const{loading:a,finished:e,getRankRewardHistory:i,historyList:l,rankType:g}=T();return(t,d)=>{const _=x;return u(),f(S,{class:"ranking-reward","is-transparent":!0,showBack:!0},{default:m(()=>[R(_,{loading:n(a),"onUpdate:loading":d[0]||(d[0]=o=>w(a)?a.value=o:null),finished:n(e),onLoad:n(i),"finished-text":"","loading-text":"loading"},{default:m(()=>[s("ul",z,[s("li",null,[s("div",null,r(t.$t("t60")),1),s("div",null,r(t.$t("t57")),1),s("div",null,r(t.$t("t59")),1)]),(u(!0),k(b,null,B(n(l),o=>(u(),k("li",{key:o.rank},[s("div",null,r(n(g)[o.rankType]),1),s("div",A,r(n(C)(o.rewardAmount,"",0)),1),s("div",null,r(o.endDate),1)]))),128))]),n(l).length===0&&!n(a)?(u(),f($,{key:0})):L("",!0)]),_:1},8,["loading","finished","onLoad"])]),_:1})}}}),U=N(D,[["__scopeId","data-v-1c4ad875"]]);export{U as default};
