import{x as B,b as G,ag as R,i as z,f as A,ah as N,T as D,_ as T}from"./index-fNs72j9w.js";import{i as U}from"./echarts-e5otCyz6.js";import{B as V,a0 as E,a8 as F,a as L,aA as S,o as j,aj as M,I as d,X as O,C as k,D as P,H as t,P as a,G as r,u as o,U as l,V as c,_ as q,O as H,n as X}from"./vue-DweYBrEc.js";const J={class:"user-views"},K={class:"card-header"},Q={class:"overview-userinfo"},W={class:"user-avatar"},Y=["src"],Z={class:"user-avatar-icons"},x={class:"user-data"},ee={class:"welcome-words"},te=V({__name:"overview",setup(ae){const{t:p}=B.useI18n(),v=E(),i=G(),f=F("accountGrowthChartRef"),n=L({days:[],score:[],money:[],charts:[]}),b=()=>{const e=U(f.value),s={grid:{top:40,right:0,bottom:20,left:50},xAxis:{data:n.days},yAxis:{},legend:{data:[p("Integral"),p("Balance")],top:0},series:[{name:p("Integral"),data:n.score,type:"line",smooth:!0,show:!1,color:"#f56c6c",emphasis:{label:{show:!0}},areaStyle:{}},{name:p("Balance"),data:n.money,type:"line",smooth:!0,show:!1,color:"#409eff",emphasis:{label:{show:!0}},areaStyle:{opacity:.4}}]};e.setOption(s),n.charts.push(e)},_=()=>{X(()=>{for(const e in n.charts)n.charts[e].resize()})};return S(()=>{_()}),j(()=>{R().then(e=>{n.days=e.data.days,n.score=e.data.score,n.money=e.data.money,b()}),z(window,"resize",_)}),M(()=>{for(const e in n.charts)n.charts[e].dispose()}),(e,s)=>{const C=d("el-button"),h=d("Icon"),w=d("el-tooltip"),u=d("el-col"),y=d("el-link"),g=d("el-row"),$=d("el-card"),I=O("blur");return k(),P("div",J,[t($,{class:"user-views-card",shadow:"hover"},{header:a(()=>[r("div",K,[r("span",null,l(e.$t("user.account.overview.Account information")),1),q((k(),H(C,{onClick:s[0]||(s[0]=m=>o(v).push({name:"account/profile"})),type:"info",plain:""},{default:a(()=>[c(l(e.$t("user.account.overview.profile")),1)]),_:1})),[[I]])])]),default:a(()=>[r("div",Q,[r("div",W,[r("img",{src:o(A)(o(i).avatar),alt:""},null,8,Y),r("div",Z,[r("div",{onClick:s[1]||(s[1]=m=>o(v).push({name:"account/profile"})),class:"avatar-icon-item"},[t(w,{effect:"light",placement:"right",content:(o(i).mobile?e.$t("user.account.overview.Filled in"):e.$t("user.account.overview.Not filled in"))+e.$t("user.account.overview.mobile")},{default:a(()=>[t(h,{name:"fa fa-tablet",size:"16",color:o(i).mobile?"var(--el-color-primary)":"var(--el-text-color-secondary)"},null,8,["color"])]),_:1},8,["content"])]),r("div",{onClick:s[2]||(s[2]=m=>o(v).push({name:"account/profile"})),class:"avatar-icon-item"},[t(w,{effect:"light",placement:"right",content:(o(i).email?e.$t("user.account.overview.Filled in"):e.$t("user.account.overview.Not filled in"))+e.$t("user.account.overview.email")},{default:a(()=>[t(h,{name:"fa fa-envelope-square",size:"14",color:o(i).email?"var(--el-color-primary)":"var(--el-text-color-secondary)"},null,8,["color"])]),_:1},8,["content"])])])]),r("div",x,[r("div",ee,l(o(i).nickname+e.$t("utils.comma")+o(N)()),1),t(g,{class:"data-item"},{default:a(()=>[t(u,{span:4},{default:a(()=>[c(l(e.$t("Integral")),1)]),_:1}),t(u,{span:8},{default:a(()=>[t(y,{onClick:s[3]||(s[3]=m=>o(v).push({name:"account/integral"})),type:"primary"},{default:a(()=>[c(l(o(i).score),1)]),_:1})]),_:1}),t(u,{span:4},{default:a(()=>[c(l(e.$t("Balance")),1)]),_:1}),t(u,{span:8},{default:a(()=>[t(y,{onClick:s[4]||(s[4]=m=>o(v).push({name:"account/balance"})),type:"primary"},{default:a(()=>[c(l(o(i).money),1)]),_:1})]),_:1})]),_:1}),t(g,{class:"data-item"},{default:a(()=>[t(u,{class:"lastlogin title",span:4},{default:a(()=>[c(l(e.$t("user.account.overview.Last login")),1)]),_:1}),t(u,{class:"lastlogin value",span:8},{default:a(()=>[c(l(o(D)(o(i).last_login_time)),1)]),_:1}),t(u,{class:"lastip",span:4},{default:a(()=>[c(l(e.$t("user.account.overview.Last login IP")),1)]),_:1}),t(u,{class:"lastip",span:8},{default:a(()=>[c(l(o(i).last_login_ip),1)]),_:1})]),_:1})])])]),_:1}),t($,{class:"user-views-card",shadow:"hover",header:e.$t("user.account.overview.Growth statistics")},{default:a(()=>[r("div",{class:"account-growth",ref_key:"accountGrowthChartRef",ref:f},null,512)]),_:1},8,["header"])])}}}),re=T(te,[["__scopeId","data-v-8ae6ad9b"]]);export{re as default};
