import{ag as g,as as R}from"./DURqPrI0.js";import{n5 as u,n6 as m,n2 as b,gV as s,cR as i,lH as n,T as r,lL as o,lG as y,R as f,lx as l,lJ as M,hq as c,gR as h,k7 as P}from"./BQCsJfSh.js";import{X as p}from"./RrweKcqb.js";const t=g([u,m,b],([e,a,d])=>({readRelays:s(e,i.Read),writeRelays:s(e,i.Write),searchRelays:s(a),messagingRelays:s(d)})),S=[{title:"Missing Inbox Relays",description:"Other people aren't currently able to reliably tag you in public notes.",action:"Update",isPending:e=>e.readRelays.length<=1,apply:()=>n(r)},{title:"Missing Outbox Relays",description:"Other people aren't currently able to reliably find your public notes.",action:"Update",isPending:e=>e.writeRelays.length<=1,apply:()=>o(r)},{title:"Missing DM Relays",description:"You aren't currently able to reliably send or receive direct messages.",action:"Update",isPending:e=>e.messagingRelays.length<=1,apply:()=>y(f)},{title:"Too Many Inbox Relays",description:"You have more inbox relays than is really necessary, which can affect resource usage.",action:"Prune Selections",isPending:e=>e.readRelays.length>8,apply:e=>n(l(5,e.readRelays))},{title:"Too Many Outbox Relays",description:"You have more outbox relays than is really necessary, which can affect resource usage.",action:"Prune Selections",isPending:e=>e.writeRelays.length>8,apply:e=>o(l(5,e.writeRelays))},{title:"Too Many DM Relays",description:"You have more DM relays than is really necessary, which can affect resource usage.",action:"Prune Selections",isPending:e=>e.messagingRelays.length>8,apply:e=>y(l(5,e.messagingRelays))},{title:"Invalid Search Relays",description:"Some of your search relays don't support search.",action:"Remove Invalid",isPending:e=>e.searchRelays.some(a=>P(c(h(a),p))),apply:e=>M(e.searchRelays.filter(a=>c(h(a),p)))}],v=e=>e.isPending(R(t)),x=e=>e.apply(R(t)),L=g(t,e=>S.filter(a=>a.isPending(e))),T=Object.freeze(Object.defineProperty({__proto__:null,applyHealthCheck:x,healthCheckContext:t,isHealthCheckPending:v,pendingHealthChecks:L},Symbol.toStringTag,{value:"Module"}));export{x as a,T as h,L as p};
//# sourceMappingURL=Cw1i9bKU.js.map
