import{_ as F,a as K}from"./BuPXYaOg.js";import{_ as T}from"./DXyvFCCy.js";import{d as j,J,g as d,i as L,f as M,e as s,o as e,l as a,m as t,a as b,w as i,b as D,c as n,t as l,n as f,_ as q,F as m,r as w,s as O}from"./Dk4AzF7j.js";import{_ as Q}from"./BnFHREeV.js";import{_ as W}from"./DWH2kpQP.js";import{_ as X}from"./BXyDg5m4.js";import{u as Y}from"./D9-3tnQL.js";import"./D7D5X_-3.js";import"./DM9AftQm.js";import"./D9EMGUu-.js";import"./B_jJHUd2.js";import"./DgCXB7yu.js";import"./DMtpgJrn.js";import"./7TXjTTLK.js";import"./B-PWL9ab.js";import"./BtsG96Qa.js";const Z={class:"@container/pluginpage"},tt={key:0,class:"flex flex-col gap-4"},et={class:"font-medium capitalize text-lg p-2"},ot={key:0,class:"flex items-center justify-center p-12"},st={class:"flex items-center gap-2"},nt={key:1,class:"pt-4"},bt=j({__name:"[plugin]-[pid]-[sid]",setup(at){const{getComponentData:B,getHealthData:E,getIdentifier:I}=Y(),{componentData:h,componentStatus:g,componentError:y}=B(),{healthData:c,healthStatus:S,healthError:p}=E(),{t:U}=J(),_=d(()=>{const r=p.value?.cause;return r?.identifier?U(`errors.${r.identifier}`):null}),k=d(()=>!!h.value?.components[0]?.component),G=L(),{plugin:N}=G.params,v=d(()=>I(N)),{policyGuard:P}=M();return(r,rt)=>{const V=F,x=T,z=q,A=Q,H=O,$=K,R=W,C=X;return e(),s("div",Z,[t(P)(`page:integrations.${t(v)}`,{trackingContext:{components:"PluginPage"}})?(e(),s("div",tt,[b(x,{class:"mb-4"},{header:i(()=>[D("div",et,l(r.$t(`extras.title.${t(v)}`)),1),t(g)==="success"?(e(),n(V,{key:0,component:t(h),"has-key":t(k)},null,8,["component","has-key"])):a("",!0)]),_:1}),t(g)==="pending"?(e(),s("div",ot,[b(z,{name:"svg-spinners:90-ring-with-bg",class:"size-6 mr-2"}),f(" "+l(r.$t("chartInfo.loadingData")),1)])):(e(),s(m,{key:1},[t(k)?(e(),s(m,{key:0},[t(_)?(e(),n(A,{key:0,class:"mb-4",variant:"subtle",color:"info",description:t(_)},null,8,["description"])):a("",!0),t(S)==="success"?(e(),n(x,{key:1,class:"o_mb-4 o_p-4"},{default:i(()=>[t(c)?.isGrouped?(e(),n(R,{key:0,items:t(c).getGroups,variant:"link",ui:{root:"w-full",list:"o_gap-6",content:"o_pt-8"}},{default:i(({item:o})=>[D("div",st,[f(l(r.$t(o.name))+" ",1),o.notifications?(e(),n(H,{key:0,size:"sm",color:"error"},{default:i(()=>[f(l(o.notifications),1)]),_:2},1024)):a("",!0)])]),content:i(({item:o})=>[(e(!0),s(m,null,w(t(c)?.groupedStats?.[o.name],u=>(e(),n($,{id:u.id,key:u.id,component:u,class:"mb-5"},null,8,["id","component"]))),128))]),_:1},8,["items"])):(e(),s("div",nt,[(e(!0),s(m,null,w(t(c)?.healthDataResults,o=>(e(),n($,{id:o.id,key:o.id,component:o,class:"mb-5"},null,8,["id","component"]))),128))]))]),_:1})):a("",!0),(t(y)||t(p))&&!t(_)?(e(),n(C,{key:2,error:t(y)||t(p),refresh:()=>{},"with-refresh":!1},null,8,["error"])):a("",!0)],64)):a("",!0)],64))])):a("",!0)])}}});export{bt as default};
