import{_ as N,a as S}from"./BuPXYaOg.js";import{_ as V}from"./DXyvFCCy.js";import{d as A,J as P,g as f,c as n,o as t,w as m,b as _,a as l,e as s,t as h,m as e,n as U,_ as F,F as p,l as a,r as L}from"./Dk4AzF7j.js";import{_ as R}from"./BnFHREeV.js";import{_ as j}from"./BXyDg5m4.js";import{_ as z}from"./D-lem41g.js";import{u as G}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 J={class:"flex flex-col gap-4"},K={class:"font-medium text-lg p-2"},M={key:0,class:"flex items-center justify-center p-12"},T={class:"pt-4"},le=A({__name:"healthCheck",setup(W){const{getComponentData:g,getHealthData:k}=G(),{componentData:y,componentStatus:x,componentError:u}=g(),{healthData:v,healthStatus:b,healthError:r}=k(),{t:C}=P(),c=f(()=>{const o=r.value?.cause;return o?.identifier?C(`errors.${o.identifier}`):null}),D=f(()=>!!y.value?.components[0].component);return(o,q)=>{const $=N,d=V,E=F,w=R,B=S,H=j,I=z;return t(),n(I,{"flag-name":"page:integrations.healthCheck","tracking-context":{components:"HealthCheckPage"}},{default:m(()=>[_("div",J,[l(d,{class:"mb-4"},{header:m(()=>[_("div",K,h(o.$t("WooCommerce Integration")),1),l($)]),_:1}),e(x)==="pending"?(t(),s("div",M,[l(E,{name:"svg-spinners:90-ring-with-bg",class:"size-6 mr-2"}),U(" "+h(o.$t("Loading...")),1)])):(t(),s(p,{key:1},[e(D)?(t(),s(p,{key:0},[e(c)?(t(),n(w,{key:0,class:"mb-4",variant:"subtle",color:"info",description:e(c)},null,8,["description"])):a("",!0),e(b)==="success"?(t(),n(d,{key:1,class:"o_mb-4 o_p-4"},{default:m(()=>[_("div",T,[(t(!0),s(p,null,L(e(v)?.healthDataResults,i=>(t(),n(B,{id:i.id,key:i.id,component:i,class:"mb-5"},null,8,["id","component"]))),128))])]),_:1})):a("",!0),(e(u)||e(r))&&!e(c)?(t(),n(H,{key:2,error:e(u)||e(r),refresh:()=>{},"with-refresh":!1},null,8,["error"])):a("",!0)],64)):a("",!0)],64))])]),_:1})}}});export{le as default};
