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