import{b as k,a as l,D as I,h as a,t as r,i as m,j as c,F as p,G as g,x as B,y as q,u as h,l as C,K as S,E as M,T as b,H as f,I as w,J as N}from"./vue-y3KLWBaS.js";import{M as V}from"./MkMarquee-aUfIJ8Oe.js";import{Q as D,f as T,V as v,n as x}from"./app-JmgyQoR0.js";const A=t=>(w("data-v-c1d4aa06"),t=t(),N(),t),F={key:0,class:"nmidsaqw"},U=["src"],z=A(()=>h("span",{class:"divider"},null,-1)),E=k({__name:"statusbar-federation",props:{display:{},colored:{type:Boolean},marqueeDuration:{},marqueeReverse:{type:Boolean},oneByOneInterval:{},refreshIntervalSec:{}},setup(t){const y=t,i=l([]),u=l(!0);let d=l(0);D(()=>{T("federation/instances",{sort:"+lastCommunicatedAt",limit:30}).then(e=>{i.value=e,u.value=!1,d.value++})},Math.max(5e3,y.refreshIntervalSec*1e3),{immediate:!0,afterMounted:!0});function _(e){var n,o;return(o=(n=v(e.iconUrl,"preview"))!=null?n:v(e.faviconUrl,"preview"))!=null?o:"/client-assets/dummy.png"}return(e,n)=>{const o=I("MkA");return u.value?f("",!0):(a(),r("span",F,[e.display==="marquee"?(a(),m(b,{key:0,name:"change",mode:"default"},{default:c(()=>[(a(),m(V,{key:d.value,duration:e.marqueeDuration,reverse:e.marqueeReverse},{default:c(()=>[(a(!0),r(p,null,g(i.value,s=>(a(),r("span",{key:s.id,class:B(["item",{colored:e.colored}]),style:q({background:e.colored?s.themeColor:null})},[h("img",{class:"icon",src:_(s),alt:""},null,8,U),C(o,{to:`/instance-info/${s.host}`,class:"host _monospace"},{default:c(()=>[S(M(s.host),1)]),_:2},1032,["to"]),z],6))),128))]),_:1},8,["duration","reverse"]))]),_:1})):e.display==="oneByOne"?(a(),r(p,{key:1},[],64)):f("",!0)]))}}}),H=x(E,[["__scopeId","data-v-c1d4aa06"]]);export{H as default};
