import{B as e,Bt as t,Dt as n,F as r,G as i,L as a,M as o,N as s,R as c,Tt as l,Ut as u,Wt as d,bt as f,j as p,ot as m,qt as h}from"./vue-3bs2-dMU.js";import{U as g,c as _,h as v,nn as y,s as b}from"./stores-DmetsdTd.js";import{C as x,D as S,K as C,S as w,_t as T,gt as E,ht as D,w as O}from"./vuetify-gGrfRH2I.js";i(),l(),u();var k={class:`ml-2`},A={key:0},j={key:1,class:`text-warning`},M={class:`ml-2`},N={class:`ml-2`},P={class:`ml-2`},F={key:0,class:`text-grey`},I={key:1,class:`text-info`},L={key:2,class:`text-warning`},R={class:`ml-2`},z={key:0,class:`text-grey`},B={key:1,class:`text-info`},V={key:2,class:`text-warning`},H=e({__name:`ConnectionStatusDialog`,props:{guid:{}},setup(e){let{isOpened:i}=g(e.guid),l=b(),u=_(),H=v(),U=p(()=>{switch(u.serverState?.connection_status){case y.CONNECTED:return`text-success`;case y.DISCONNECTED:return`text-error`;case y.FIREWALLED:return`text-warning`;default:return`text-grey`}});function W(){i.value=!1}return(e,p)=>(m(),s(w,{modelValue:t(i),"onUpdate:modelValue":p[0]||=e=>n(i)?i.value=e:null},{default:f(()=>[c(x,null,{default:f(()=>[c(O,null,{default:f(()=>[c(E,null,{default:f(()=>[c(T,{cols:`12`,sm:`6`,lg:`3`},{default:f(()=>[o(`div`,null,h(e.$t(`dialogs.connectionStatus.status`)),1),o(`div`,{class:d([`ml-2`,U.value])},h(e.$t(`constants.connectionStatus.`+t(u).serverState?.connection_status)),3)]),_:1}),c(T,{cols:`12`,sm:`6`,lg:`3`},{default:f(()=>[o(`div`,null,h(e.$t(`dialogs.connectionStatus.externalIp`)),1),o(`div`,k,[t(l).externalIp?(m(),r(`span`,A,h(t(l).externalIp),1)):(m(),r(`span`,j,h(e.$t(`dialogs.connectionStatus.noExternalIp`)),1))])]),_:1}),c(T,{cols:`12`,sm:`6`,lg:`3`},{default:f(()=>[o(`div`,null,h(e.$t(`dialogs.connectionStatus.dht_nodes`)),1),o(`div`,M,h(t(u).serverState?.dht_nodes),1)]),_:1}),c(T,{cols:`12`,sm:`6`,lg:`3`},{default:f(()=>[o(`div`,null,h(e.$t(`dialogs.connectionStatus.total_peer_connections`)),1),o(`div`,N,h(t(u).serverState?.total_peer_connections),1)]),_:1}),c(T,{cols:`12`,sm:`6`,lg:`3`},{default:f(()=>[o(`div`,null,h(e.$t(`dialogs.connectionStatus.isp_details`)),1),o(`div`,P,[t(H).fetchExternalIpInfo?t(l).ispDetails?(m(),r(`span`,I,h(t(l).ispDetails),1)):(m(),r(`span`,L,h(e.$t(`dialogs.connectionStatus.fetch_isp_failed`)),1)):(m(),r(`span`,F,h(e.$t(`dialogs.connectionStatus.fetch_disabled`)),1))])]),_:1}),c(T,{cols:`12`,sm:`6`,lg:`3`},{default:f(()=>[o(`div`,null,h(e.$t(`dialogs.connectionStatus.geo_details`)),1),o(`div`,R,[t(H).fetchExternalIpInfo?t(l).geoDetails?(m(),r(`span`,B,h(t(l).geoDetails),1)):(m(),r(`span`,V,h(e.$t(`dialogs.connectionStatus.fetch_geo_failed`)),1)):(m(),r(`span`,z,h(e.$t(`dialogs.connectionStatus.fetch_disabled`)),1))])]),_:1})]),_:1})]),_:1}),c(S,null,{default:f(()=>[c(D),c(C,{color:`error`,onClick:W},{default:f(()=>[a(h(e.$t(`common.close`)),1)]),_:1})]),_:1})]),_:1})]),_:1},8,[`modelValue`]))}});export{H as default};