import{d as m,C as h,c as s,u as t,a,f as r,t as d,k as y,l as f,R as _,b,o,q as w}from"./index-CXwCk-SR.js";import{u as g}from"./useOverviewDashboards-CMJfI6kJ.js";import{u as O}from"./useLayers-CmM8Q7L7.js";import{_ as k}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useQuery-DB4moXtm.js";const L={class:"landing"},N={key:0,class:"banner err"},x={key:1,class:"empty"},C={key:2,class:"empty"},A={class:"empty-card"},B={key:0},R={key:1},V=m({__name:"OverviewLanding",setup(E){const v=w(),{publicOverviews:p,isLoading:i}=g(),{oapReachable:c,oapError:u,availableLayers:n}=O();return h(()=>{if(i.value)return;const l=p.value[0];l&&v.replace({name:"overview-dashboard",params:{id:l.id}})}),(l,e)=>(o(),s("div",L,[!t(c)&&!t(i)?(o(),s("div",N,[e[0]||(e[0]=a("strong",null,"OAP unreachable.",-1)),r(" "+d(t(u)??"Check that the OAP query host is up and reachable from the BFF."),1)])):t(i)?(o(),s("div",x,"Loading…")):t(p).length===0?(o(),s("div",C,[a("div",A,[e[4]||(e[4]=a("h2",null,"No public overview is currently active",-1)),t(n).length===0?(o(),s("p",B," No layer is reporting services yet. Once data flows through OAP, the relevant overview (Services / Mesh / …) will appear here automatically. ")):(o(),s("p",R,[r(" The deployment is reporting on "+d(t(n).length)+" layer"+d(t(n).length===1?"":"s")+", but no overview is set to ",1),e[1]||(e[1]=a("code",null,"visibility: public",-1)),e[2]||(e[2]=r(". Operations-only overviews are reachable from the Admin section in the sidebar. ",-1))])),y(t(_),{class:"sw-btn is-primary",to:"/admin/overview-templates"},{default:f(()=>[...e[3]||(e[3]=[r(" Open Overview templates ",-1)])]),_:1})])])):b("",!0)]))}}),T=k(V,[["__scopeId","data-v-882c0de7"]]);export{T as default};
