import{u as v}from"./useQuery-DB4moXtm.js";import{i as a,x as b}from"./index-CXwCk-SR.js";function h(){const u=v({queryKey:["oap-preflight"],queryFn:()=>b.menu.preflight(),staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!0}),n=a(()=>u.data.value??null),r=a(()=>{var e;return((e=n.value)==null?void 0:e.adminReachable)??!1}),i=a(()=>{var e;return(e=n.value)==null?void 0:e.adminUrl}),s=a(()=>{var e;return(e=n.value)==null?void 0:e.adminError});function l(e){return a(()=>{var t;return(t=n.value)==null?void 0:t.modules.find(f=>f.name===e)})}const o=a(()=>{var e;return((e=l("receiver-runtime-rule").value)==null?void 0:e.enabled)??!1}),d=a(()=>{var e;return((e=l("dsl-debugging").value)==null?void 0:e.enabled)??!1}),c=a(()=>{var e;return((e=l("inspect").value)==null?void 0:e.enabled)??!1}),m=a(()=>!n.value||!r.value);return{isLoading:u.isLoading,result:n,adminUrl:i,adminReachable:r,adminUnavailable:m,adminError:s,runtimeRuleEnabled:o,dslDebuggingEnabled:d,inspectEnabled:c,moduleByName:l,refetch:u.refetch}}export{h as u};
