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