import{e as a}from"./dashboard-Bj2OwIP9.js";import{q as n,r as s,R as o,t,v as r,A as l,K as e,H as c,L as i,aq as d,G as m,bE as k}from"./vendor-core-Di0OO4oJ.js";import"./index-BkDr3sJj.js";import"./vendor-element-DupX9wXy.js";const v={class:"monitor-ranking"},h={class:"ranking-section"},b={class:"section-header"},p={class:"title"},u={class:"ranking-table"},g={class:"table-header"},y={class:"col-rank"},$={class:"col-name"},w={class:"col-amount"},f={class:"table-body"},j={class:"col-rank"},x={class:"col-name"},_={class:"col-amount"},D={key:0,class:"no-data"},q={class:"ranking-section mt-4"},N={class:"section-header"},P={class:"title"},T={class:"ranking-table"},U={class:"table-header"},A={class:"col-rank"},E={class:"col-name"},G={class:"col-amount"},H={class:"table-body"},I={class:"col-rank"},K={class:"col-name"},L={class:"col-amount"},R={key:0,class:"no-data"},z=k(n({__name:"monitor-ranking",setup(n){const k=s([]),z=s([]);return o(()=>{return n=null,s=null,o=function*(){try{const n=yield a();n&&(k.value=n.today,z.value=n.month)}catch(n){}},new Promise((a,t)=>{var r=a=>{try{e(o.next(a))}catch(n){t(n)}},l=a=>{try{e(o.throw(a))}catch(n){t(n)}},e=n=>n.done?a(n.value):Promise.resolve(n.value).then(r,l);e((o=o.apply(n,s)).next())});var n,s,o}),(a,n)=>(r(),t("div",v,[l("div",h,[l("div",b,[l("span",p,e(a.$t("dashboard.monitor.ranking.todayTitle")),1)]),l("div",u,[l("div",g,[l("span",y,e(a.$t("dashboard.monitor.ranking.rank")),1),l("span",$,e(a.$t("dashboard.monitor.ranking.merchantName")),1),l("span",w,e(a.$t("dashboard.monitor.ranking.amount")),1)]),l("div",f,[(r(!0),t(i,null,d(k.value,(a,n)=>(r(),t("div",{key:n,class:"table-row"},[l("span",j,[l("span",{class:m(["rank-badge",`rank-${n+1}`])},e(n+1),3)]),l("span",x,e(a.name||"Unknown"),1),l("span",_,e(a.amount),1)]))),128)),0===k.value.length?(r(),t("div",D,e(a.$t("dashboard.monitor.ranking.noData")),1)):c("",!0)])])]),l("div",q,[l("div",N,[l("span",P,e(a.$t("dashboard.monitor.ranking.monthTitle")),1)]),l("div",T,[l("div",U,[l("span",A,e(a.$t("dashboard.monitor.ranking.rank")),1),l("span",E,e(a.$t("dashboard.monitor.ranking.merchantName")),1),l("span",G,e(a.$t("dashboard.monitor.ranking.amount")),1)]),l("div",H,[(r(!0),t(i,null,d(z.value,(a,n)=>(r(),t("div",{key:n,class:"table-row"},[l("span",I,[l("span",{class:m(["rank-badge",`rank-${n+1}`])},e(n+1),3)]),l("span",K,e(a.name||"Unknown"),1),l("span",L,e(a.amount),1)]))),128)),0===z.value.length?(r(),t("div",R,e(a.$t("dashboard.monitor.ranking.noData")),1)):c("",!0)])])])]))}}),[["__scopeId","data-v-e5b9e96d"]]);export{z as default};
