import{B as e,Bt as t,Dt as n,G as r,L as i,M as a,N as o,R as s,Tt as c,Ut as l,bt as u,ot as d,qt as f}from"./vue-3bs2-dMU.js";import{U as p,c as m,h,zt as g}from"./stores-DmetsdTd.js";import{C as _,D as v,K as y,S as b,T as x,_t as S,gt as C,ht as w,tt as T,w as E}from"./vuetify-gGrfRH2I.js";r(),c(),l();var D={class:`text-title-large`},O={class:`ml-2`},k={class:`ml-2`},A={class:`ml-2`},j={class:`ml-2`},M={class:`ml-2`},N={class:`text-title-large`},P={class:`ml-2`},F={class:`ml-2`},I={class:`text-title-large`},L={class:`ml-2`},R={class:`ml-2`},z={class:`ml-2`},B={class:`ml-2`},V={class:`ml-2`},H=e({__name:`StatsDialog`,props:{guid:{}},setup(e){let{isOpened:r}=p(e.guid),c=m(),l=h();function H(){r.value=!1}return(e,p)=>(d(),o(b,{modelValue:t(r),"onUpdate:modelValue":p[0]||=e=>n(r)?r.value=e:null,"max-width":800},{default:u(()=>[s(_,null,{default:u(()=>[s(x,null,{default:u(()=>[i(f(e.$t(`dialogs.stats.title`)),1)]),_:1}),s(E,null,{default:u(()=>[s(C,null,{default:u(()=>[s(S,{cols:`12`},{default:u(()=>[a(`div`,D,f(e.$t(`dialogs.stats.user_statistics`)),1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.all_time_upload`)),1),a(`div`,O,f(t(g)(t(c).serverState?.alltime_ul??0,t(l).useBinarySize)),1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.all_time_download`)),1),a(`div`,k,f(t(g)(t(c).serverState?.alltime_dl??0,t(l).useBinarySize)),1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.all_time_share_ratio`)),1),a(`div`,A,f(t(c).serverState?.global_ratio),1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.session_waste`)),1),a(`div`,j,f(t(g)(t(c).serverState?.total_wasted_session??0,t(l).useBinarySize)),1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.connected_peers`)),1),a(`div`,M,f(t(c).serverState?.total_peer_connections),1)]),_:1})]),_:1}),s(T,{class:`my-4`}),s(C,null,{default:u(()=>[s(S,{cols:`12`},{default:u(()=>[a(`div`,N,f(e.$t(`dialogs.stats.cache_statistics`)),1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.read_cache_hits`)),1),a(`div`,P,f(t(c).serverState?.read_cache_hits)+`%`,1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.total_buffer_size`)),1),a(`div`,F,f(t(g)(t(c).serverState?.total_buffers_size??0,t(l).useBinarySize)),1)]),_:1})]),_:1}),s(T,{class:`my-4`}),s(C,null,{default:u(()=>[s(S,{cols:`12`},{default:u(()=>[a(`div`,I,f(e.$t(`dialogs.stats.performance_statistics`)),1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.write_cache_overload`)),1),a(`div`,L,f(t(c).serverState?.write_cache_overload)+`%`,1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.read_cache_overload`)),1),a(`div`,R,f(t(c).serverState?.read_cache_overload)+`%`,1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.queued_io_jobs`)),1),a(`div`,z,f(t(c).serverState?.queued_io_jobs),1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.average_time_in_queue`)),1),a(`div`,B,f(t(c).serverState?.average_time_queue)+` ms`,1)]),_:1}),s(S,{cols:`12`,sm:`6`},{default:u(()=>[a(`div`,null,f(e.$t(`dialogs.stats.total_queued_size`)),1),a(`div`,V,f(t(g)(t(c).serverState?.total_queued_size??0,t(l).useBinarySize)),1)]),_:1})]),_:1})]),_:1}),s(v,null,{default:u(()=>[s(w),s(y,{color:`error`,onClick:H},{default:u(()=>[i(f(e.$t(`common.close`)),1)]),_:1})]),_:1})]),_:1})]),_:1},8,[`modelValue`]))}});export{H as default};