import{d as h,u as x,c as _,a as B,b as C,e as D,r as i,o,f as t,w as s,g as a,_ as P,h as u,i as T,j as I,k as n,l as N,m as S,n as V,p as A,q as j,P as f,s as m,t as c,v as w,F as q,x as z,y as E,z as H,A as J,B as L,C as O}from"./index.647f6a83.js";import{u as G}from"./useRouteParam.58df0b75.js";const K={class:"flow-run__meta"},X=h({__name:"FlowRun",setup(M){const p=x(),r=G("id"),y=_(()=>{const l=["Logs","Task Runs","Sub Flow Runs","Parameters"];return O.xl||l.push("Details"),l}),v=B(L.getFlowRun,[r],{interval:5e3}),e=_(()=>v.response),k=_(()=>{var l;return(l=e.value)!=null&&l.parameters?JSON.stringify(e.value.parameters,void 0,2):"{}"});function R(){p.push(c.flowRuns())}const $=_(()=>{var l;return(l=e.value)==null?void 0:l.stateType});C($);const b=_(()=>e.value?`Flow Run: ${e.value.name}`:"Flow Run");return D(b),(l,Q)=>{const d=i("router-link"),F=i("p-tabs"),g=i("p-layout-well");return o(),t(g,{class:"flow-run"},{header:s(()=>[a(e)?(o(),t(a(P),{key:0,"flow-run":a(e),onDelete:R},null,8,["flow-run"])):u("",!0)]),well:s(()=>[a(e)?(o(),T(q,{key:0},[I("div",K,[n(a(N),{state:a(e).state},null,8,["state"]),n(a(S),{duration:a(e).duration},null,8,["duration"]),n(a(V),{"flow-id":a(e).flowId},null,8,["flow-id"]),a(e).deploymentId?(o(),t(a(A),{key:0,"deployment-id":a(e).deploymentId},null,8,["deployment-id"])):u("",!0),n(a(j),{"flow-run":a(e)},null,8,["flow-run"])]),n(a(f)),n(d,{to:a(c).radar(a(r)),class:"flow-run__small-radar-link"},{default:s(()=>[n(a(m),{"flow-run-id":a(r),class:"flow-run__small-radar"},null,8,["flow-run-id"])]),_:1},8,["to"]),n(a(f)),n(a(w),{"flow-run":a(e),alternate:""},null,8,["flow-run"])],64)):u("",!0)]),default:s(()=>[n(F,{tabs:a(y)},{details:s(()=>[n(d,{to:a(c).radar(a(r)),class:"flow-run__small-radar-link"},{default:s(()=>[n(a(m),{"flow-run-id":a(r),class:"flow-run__small-radar"},null,8,["flow-run-id"])]),_:1},8,["to"]),n(a(f)),a(e)?(o(),t(a(w),{key:0,"flow-run":a(e)},null,8,["flow-run"])):u("",!0)]),logs:s(()=>[a(e)?(o(),t(a(z),{key:0,"flow-run":a(e)},null,8,["flow-run"])):u("",!0)]),"task-runs":s(()=>[a(e)?(o(),t(a(E),{key:0,"flow-run-id":a(e).id},null,8,["flow-run-id"])):u("",!0)]),"sub-flow-runs":s(()=>[a(e)?(o(),t(a(H),{key:0,"flow-run-id":a(e).id},null,8,["flow-run-id"])):u("",!0)]),parameters:s(()=>[n(a(J),{value:a(k)},null,8,["value"])]),_:1},8,["tabs"])]),_:1})}}});export{X as default};
