var a=Object.defineProperty,t=Object.prototype.hasOwnProperty,e=Object.getOwnPropertySymbols,l=Object.prototype.propertyIsEnumerable,s=(t,e,l)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l;import{r,o as d,a as o,t as n,u,b as i,c as p,d as b,e as c,f,g as _,h as m,w as x,F as g,i as D,j as y}from"./index.a0f02932.js";const h={name:"Dashboard",emits:["updateVersion"],setup(a,i){u();const p=r({statData:{loading:!0,user:{},torrent:{},user_class:{},system_info:{}},latestUser:{loading:!0,data:[]},latestTorrent:{loading:!0,data:[]}});return d((()=>{o.listStatData().then((a=>{p.statData=a.data,p.statData.loading=!1,i.emit("updateVersion",a.data.system_info.data)})),o.listLatestUser().then((a=>{p.latestUser.data=a.data,p.latestUser.loading=!1})),o.listLatestTorrent().then((a=>{p.latestTorrent.data=a.data,p.latestTorrent.loading=!1}))})),((a,r)=>{for(var d in r||(r={}))t.call(r,d)&&s(a,d,r[d]);if(e)for(var d of e(r))l.call(r,d)&&s(a,d,r[d]);return a})({},n(p))}},v=y(),U=v(((a,t,e,l,s,r)=>{const d=i("el-table-column"),o=i("el-table"),n=i("el-card"),u=i("el-col"),y=i("el-row"),h=i("el-descriptions-item"),U=i("el-descriptions"),w=p("loading");return b(),c(g,null,[f(y,null,{default:v((()=>[f(u,{span:12,class:"stat-box"},{default:v((()=>[f(n,null,{header:v((()=>[_(m(a.latestUser.data.page_title),1)])),default:v((()=>[x(f(o,{data:a.latestUser.data.data},{default:v((()=>[f(d,{prop:"username",label:"Username"}),f(d,{prop:"email",label:"Email"}),f(d,{prop:"status",label:"Status"}),f(d,{prop:"added",label:"Added"})])),_:1},8,["data"]),[[w,a.latestUser.loading]])])),_:1})])),_:1}),f(u,{span:12,class:"stat-box"},{default:v((()=>[f(n,null,{header:v((()=>[_(m(a.latestTorrent.data.page_title),1)])),default:v((()=>[x(f(o,{data:a.latestTorrent.data.data},{default:v((()=>[f(d,{prop:"name",label:"Name",width:"250"}),f(d,{prop:"user.username",label:"User"}),f(d,{prop:"size_human",label:"Size"}),f(d,{prop:"added",label:"Added"})])),_:1},8,["data"]),[[w,a.latestTorrent.loading]])])),_:1})])),_:1})])),_:1}),x(f("div",null,[f(y,{class:"row"},{default:v((()=>[f(u,{span:12,class:"stat-box"},{default:v((()=>[f(U,{title:a.statData.user.text,column:2,border:""},{default:v((()=>[(b(!0),c(g,null,D(a.statData.user.data,(a=>(b(),c(h,{label:a.text},{default:v((()=>[_(m(a.value),1)])),_:2},1032,["label"])))),256))])),_:1},8,["title"])])),_:1}),f(u,{span:12,class:"stat-box"},{default:v((()=>[f(U,{title:a.statData.user_class.text,column:2,border:""},{default:v((()=>[(b(!0),c(g,null,D(a.statData.user_class.data,(a=>(b(),c(h,{label:a.class_text},{default:v((()=>[_(m(a.counts),1)])),_:2},1032,["label"])))),256))])),_:1},8,["title"])])),_:1})])),_:1}),f(y,{class:"row"},{default:v((()=>[f(u,{span:12,class:"stat-box"},{default:v((()=>[f(U,{title:a.statData.torrent.text,column:2,border:""},{default:v((()=>[(b(!0),c(g,null,D(a.statData.torrent.data,(a=>(b(),c(h,{label:a.text},{default:v((()=>[_(m(a.value),1)])),_:2},1032,["label"])))),256))])),_:1},8,["title"])])),_:1}),f(u,{span:12,class:"stat-box"},{default:v((()=>[f(U,{title:a.statData.system_info.text,column:2,border:""},{default:v((()=>[(b(!0),c(g,null,D(a.statData.system_info.data,(a=>(b(),c(h,{label:a.text},{default:v((()=>[_(m(a.value),1)])),_:2},1032,["label"])))),256))])),_:1},8,["title"])])),_:1})])),_:1})],512),[[w,a.statData.loading]])],64)}));h.render=U,h.__scopeId="data-v-c57415be";export default h;
