import{a1 as a,a4 as e}from"./vendor-element-DupX9wXy.js";import{_ as s}from"./index.vue_vue_type_script_setup_true_lang-CcJLeMY2.js";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-Fn4MZzw6.js";import{f as r}from"./dashboard-Bj2OwIP9.js";import{q as l,a2 as o,R as c,D as d,v as n,E as i,t as u,L as m,aq as p,A as x,K as h,M as b,H as _,J as g,G as f}from"./vendor-core-Di0OO4oJ.js";const v={class:"art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4"},y={class:"text-g-700 text-sm"},L={class:"flex flex-col mt-2"},w={key:0,class:"mt-1 text-xs text-gray-400 font-normal"},k={key:0,class:"ml-1"},N={class:"flex-c mt-1"},j={class:"text-xs text-g-600"},V={class:"absolute top-0 bottom-0 right-5 m-auto size-12.5 rounded-xl flex-cc bg-theme/10"},$=l({__name:"card-list",setup(l){const $=o([{des:"dashboard.workplace.cardList.visits",icon:"ri:pie-chart-line",startVal:0,duration:1e3,num:0,change:"0%",subLabel:"dashboard.workplace.cardList.history"},{des:"dashboard.workplace.cardList.sales",icon:"ri:money-cny-circle-line",startVal:0,duration:1e3,num:0,change:"0%",decimals:2,prefix:"¥",subLabel:"dashboard.workplace.cardList.totalSales"},{des:"dashboard.workplace.cardList.orders",icon:"ri:shopping-bag-3-line",startVal:0,duration:1e3,num:0,change:"0%",subLabel:"dashboard.workplace.cardList.paid"},{des:"dashboard.workplace.cardList.newUsers",icon:"ri:user-add-line",startVal:0,duration:1e3,num:0,change:"0%",subLabel:"dashboard.workplace.cardList.total"}]);return c(()=>{return a=null,e=null,s=function*(){try{const a=yield r();a&&($[0].num=a.today_visits,$[0].subNum=a.total_visits,$[0].change=a.visits_change,$[1].num=a.today_sales,$[1].subNum=a.total_platform_sales,$[1].change=a.sales_change,$[2].num=a.today_total_orders,$[2].subNum=a.today_orders,$[2].totalNum=a.total_orders,$[2].change=a.orders_change,$[3].num=a.new_users,$[3].subNum=a.total_users,$[3].change=a.users_change)}catch(a){}},new Promise((t,r)=>{var l=a=>{try{c(s.next(a))}catch(e){r(e)}},o=a=>{try{c(s.throw(a))}catch(e){r(e)}},c=a=>a.done?t(a.value):Promise.resolve(a.value).then(l,o);c((s=s.apply(a,e)).next())});var a,e,s}),(r,l)=>{const o=t,c=s,q=a,D=e;return n(),d(D,{gutter:20},{default:i(()=>[(n(!0),u(m,null,p($,(a,e)=>(n(),d(q,{key:e,xs:24,sm:12,md:6,lg:6},{default:i(()=>[x("div",v,[x("span",y,h(r.$t(a.des)),1),x("div",L,[b(o,{class:"text-[32px] font-bold",target:a.num,duration:1300,decimals:a.decimals||0,prefix:a.prefix||""},null,8,["target","decimals","prefix"]),void 0!==a.subNum?(n(),u("div",w,[g(h(r.$t(a.subLabel||"dashboard.workplace.cardList.total"))+" ",1),b(o,{target:a.subNum,duration:1300,decimals:a.decimals||0,prefix:a.prefix||""},null,8,["target","decimals","prefix"]),void 0!==a.totalNum?(n(),u("span",k,[g(" ("+h(r.$t("dashboard.workplace.cardList.total"))+" ",1),b(o,{target:a.totalNum,duration:1300},null,8,["target"]),l[0]||(l[0]=g(") ",-1))])):_("",!0)])):_("",!0)]),x("div",N,[x("span",j,h(r.$t("dashboard.workplace.cardList.compareYesterday")),1),x("span",{class:f(["ml-1 text-xs font-semibold",[-1===a.change.indexOf("+")&&"0%"!==a.change?"text-danger":"text-success"]])},h(a.change),3)]),x("div",V,[b(c,{icon:a.icon,class:"text-xl text-theme"},null,8,["icon"])])])]),_:2},1024))),128))]),_:1})}}});export{$ as _};
