import{_ as M,a as P}from"./CFPZ5lrL.js";import{_ as J}from"./DaLgO_IH.js";import{d as O,I as Q,i as f,k as W,f as a,b as e,q as h,w as i,e as k,c as n,a as c,t as _,u as t,n as g,_ as X,F as m,g as U,v as Y}from"./B2UyoCas.js";import{_ as Z}from"./C9KnTrrC.js";import{_ as tt}from"./CImxwpj3.js";import{_ as et}from"./DvpWg0hF.js";import{_ as ot}from"./DzX7OmD3.js";import{u as st}from"./Cu6YsGbd.js";import"./DeNTsafF.js";import"./khFVj9yI.js";import"./DyQtVBit.js";import"./DmViyvlQ.js";import"./CsNNGtvO.js";import"./d7uC5V4A.js";import"./CHIgUVhi.js";import"./DrZRFQXy.js";import"./C7qbYC45.js";const nt={class:"@container/pluginpage"},at={class:"flex flex-col gap-4"},rt={class:"font-medium capitalize text-lg p-2"},it={key:0,class:"flex items-center justify-center p-12"},ct={class:"flex items-center gap-2"},lt={key:1,class:"pt-4"},Et=O({__name:"[plugin]-[pid]-[sid]",setup(_t){const{getComponentData:A,getHealthData:N,getIdentifier:V}=st(),{componentData:y,componentStatus:v,componentError:x}=A(),{healthData:l,healthStatus:z,healthError:p}=N(),{t:F}=Q(),u=f(()=>{var r;const o=(r=p.value)==null?void 0:r.cause;return o!=null&&o.identifier?F(`errors.${o.identifier}`):null}),$=f(()=>{var o,r;return!!((r=(o=y.value)==null?void 0:o.components[0])!=null&&r.component)}),G=W(),{plugin:b}=G.params,H=f(()=>V(b));return(o,r)=>{const R=M,D=J,K=X,T=Z,j=Y,I=P,q=tt,C=et,L=ot;return e(),a("div",nt,[h(L,{"check-key":`plugins.${t(b)}.settings`},{default:i(()=>[k("div",at,[h(D,{class:"mb-4"},{header:i(()=>[k("div",rt,_(o.$t(`extras.title.${t(H)}`)),1),t(v)==="success"?(e(),n(R,{key:0,component:t(y),"has-key":t($)},null,8,["component","has-key"])):c("",!0)]),_:1}),t(v)==="pending"?(e(),a("div",it,[h(K,{name:"svg-spinners:90-ring-with-bg",class:"size-6 mr-2"}),g(" "+_(o.$t("chartInfo.loadingData")),1)])):(e(),a(m,{key:1},[t($)?(e(),a(m,{key:0},[t(u)?(e(),n(T,{key:0,class:"mb-4",variant:"subtle",color:"info",description:t(u)},null,8,["description"])):c("",!0),t(z)==="success"?(e(),n(D,{key:1,class:"o_mb-4 o_p-4"},{default:i(()=>{var w,B;return[(w=t(l))!=null&&w.isGrouped?(e(),n(q,{key:0,items:t(l).getGroups,variant:"link",ui:{root:"w-full",list:"o_gap-6",content:"o_pt-8"}},{default:i(({item:s})=>[k("div",ct,[g(_(o.$t(s.name))+" ",1),s.notifications?(e(),n(j,{key:0,size:"sm",color:"error"},{default:i(()=>[g(_(s.notifications),1)]),_:2},1024)):c("",!0)])]),content:i(({item:s})=>{var E,S;return[(e(!0),a(m,null,U((S=(E=t(l))==null?void 0:E.groupedStats)==null?void 0:S[s.name],d=>(e(),n(I,{id:d.id,key:d.id,component:d,class:"mb-5"},null,8,["id","component"]))),128))]}),_:1},8,["items"])):(e(),a("div",lt,[(e(!0),a(m,null,U((B=t(l))==null?void 0:B.healthDataResults,s=>(e(),n(I,{id:s.id,key:s.id,component:s,class:"mb-5"},null,8,["id","component"]))),128))]))]}),_:1})):c("",!0),(t(x)||t(p))&&!t(u)?(e(),n(C,{key:2,error:t(x)||t(p),refresh:()=>{},"with-refresh":!1},null,8,["error"])):c("",!0)],64)):c("",!0)],64))])]),_:1},8,["check-key"])])}}});export{Et as default};
