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