import{b as t,a7 as w,af as v,_ as A}from"./app-QjDgb7aF.js";import{M}from"./MkPagination-DzUgufpZ.js";import{M as C}from"./MkInstanceCardMini-D7K40nnW.js";import{F as y}from"./split-B5EOpoau.js";import{b as x,E as B,A as R,j as _,p as b,q as o,k as p,i as a,J as g,D as s,u as e,I as m,g as h,F as D,G as F,l as I,a as f,f as N}from"./vue-Cm77DuTi.js";const q={class:"taeiyria"},E={class:"query"},L={value:"all"},U={value:"federating"},X={value:"subscribing"},j={value:"publishing"},G={value:"suspended"},J={value:"blocked"},P={value:"silenced"},T={value:"notResponding"},z={value:"+pubSub"},H={value:"-pubSub"},K={value:"+notes"},Q={value:"-notes"},W={value:"+users"},Y={value:"-users"},Z={value:"+following"},$={value:"-following"},ee={value:"+followers"},te={value:"-followers"},se={value:"+caughtAt"},oe={value:"-caughtAt"},ne={value:"+lastCommunicatedAt"},ie={value:"-lastCommunicatedAt"},ae={class:"dqokceoi"},de=x({__name:"about.federation",setup(le){let l=f(""),n=f("federating"),r=f("+pubSub");const k={endpoint:"federation/instances",limit:10,offsetMode:!0,params:N(()=>({sort:r.value,host:l.value!==""?l.value:null,...n.value==="federating"?{federating:!0}:n.value==="subscribing"?{subscribing:!0}:n.value==="publishing"?{publishing:!0}:n.value==="suspended"?{suspended:!0}:n.value==="blocked"?{blocked:!0}:n.value==="silenced"?{silenced:!0}:n.value==="notResponding"?{notResponding:!0}:{}}))};function S(u){return u.isSuspended?"Suspended":u.isBlocked?"Blocked":u.isSilenced?"Silenced":u.isNotResponding?"Error":"Alive"}return(u,d)=>{const O=B("MkA"),V=R("tooltip");return _(),b("div",q,[o("div",E,[p(w,{modelValue:e(l),"onUpdate:modelValue":d[0]||(d[0]=i=>m(l)?l.value=i:l=i),debounce:!0,class:""},{prefix:a(()=>[...d[3]||(d[3]=[o("i",{class:"ph-magnifying-glass ph-bold ph-lg"},null,-1)])]),label:a(()=>[g(s(e(t).ts.host),1)]),_:1},8,["modelValue"]),p(y,{style:{"margin-top":"var(--margin)"}},{default:a(()=>[p(v,{modelValue:e(n),"onUpdate:modelValue":d[1]||(d[1]=i=>m(n)?n.value=i:n=i)},{label:a(()=>[g(s(e(t).ts.state),1)]),default:a(()=>[o("option",L,s(e(t).ts.all),1),o("option",U,s(e(t).ts.federating),1),o("option",X,s(e(t).ts.subscribing),1),o("option",j,s(e(t).ts.publishing),1),o("option",G,s(e(t).ts.suspended),1),o("option",J,s(e(t).ts.blocked),1),o("option",P,s(e(t).ts.silenced),1),o("option",T,s(e(t).ts.notResponding),1)]),_:1},8,["modelValue"]),p(v,{modelValue:e(r),"onUpdate:modelValue":d[2]||(d[2]=i=>m(r)?r.value=i:r=i)},{label:a(()=>[g(s(e(t).ts.sort),1)]),default:a(()=>[o("option",z,s(e(t).ts.pubSub)+" ("+s(e(t).ts.descendingOrder)+") ",1),o("option",H,s(e(t).ts.pubSub)+" ("+s(e(t).ts.ascendingOrder)+") ",1),o("option",K,s(e(t).ts.notes)+" ("+s(e(t).ts.descendingOrder)+") ",1),o("option",Q,s(e(t).ts.notes)+" ("+s(e(t).ts.ascendingOrder)+") ",1),o("option",W,s(e(t).ts.users)+" ("+s(e(t).ts.descendingOrder)+") ",1),o("option",Y,s(e(t).ts.users)+" ("+s(e(t).ts.ascendingOrder)+") ",1),o("option",Z,s(e(t).ts.following)+" ("+s(e(t).ts.descendingOrder)+") ",1),o("option",$,s(e(t).ts.following)+" ("+s(e(t).ts.ascendingOrder)+") ",1),o("option",ee,s(e(t).ts.followers)+" ("+s(e(t).ts.descendingOrder)+") ",1),o("option",te,s(e(t).ts.followers)+" ("+s(e(t).ts.ascendingOrder)+") ",1),o("option",se,s(e(t).ts.registeredAt)+" ("+s(e(t).ts.descendingOrder)+") ",1),o("option",oe,s(e(t).ts.registeredAt)+" ("+s(e(t).ts.ascendingOrder)+") ",1),o("option",ne,s(e(t).ts.lastCommunication)+" ("+s(e(t).ts.descendingOrder)+") ",1),o("option",ie,s(e(t).ts.lastCommunication)+" ("+s(e(t).ts.ascendingOrder)+") ",1)]),_:1},8,["modelValue"])]),_:1})]),(_(),h(M,{ref:"instances",key:e(l)+e(n),pagination:k},{default:a(({items:i})=>[o("div",ae,[(_(!0),b(D,null,F(i,c=>I((_(),h(O,{key:c.id,class:"instance",to:`/instance-info/${c.host}`},{default:a(()=>[p(C,{instance:c},null,8,["instance"])]),_:2},1032,["to"])),[[V,`Last communicated: ${new Date(c.lastCommunicatedAt).toLocaleString()}
Status: ${S(c)}`,void 0,{mfm:!0}]])),128))])]),_:1}))])}}}),ge=A(de,[["__scopeId","data-v-5faede28"]]);export{ge as X};
//# sourceMappingURL=about.federation-DGSOU42T.js.map
