import{a as I,r as B,b as L,c as u,D as P,x as $,$ as j,Y as A,_ as N,a0 as V,a1 as q,f as a,w as l,g as f,B as G,o,u as e,a2 as H,h as n,a3 as d,a4 as K,j as _,a5 as M,a6 as O,a7 as U,a8 as X,a9 as Y,aa as z,X as E}from"./index-e7fdb3d4.js";import{u as J}from"./usePageTitle-df55e3a5.js";const ee=I({__name:"FlowRun",setup(Q){const m=G(),c=B("Logs"),p=L("flowRunId"),y=u(()=>{const s=["Logs","Task Runs","Results","Artifacts","Subflow Runs","Parameters"];return P.xl||s.push("Details"),s}),R=$(),v=j(R.flowRuns.getFlowRun,[p],{interval:5e3}),t=u(()=>v.response),g=u(()=>{var s;return(s=t.value)==null?void 0:s.deploymentId}),{deployment:w}=A(g);N(p,(s,r)=>{s!==r&&(c.value="Logs")});const k=u(()=>{var s;return((s=t.value)==null?void 0:s.parameters)??{}}),h=u(()=>{var s;return((s=w.value)==null?void 0:s.parameterOpenApiSchema)??{}}),i=u(()=>V(k.value,h.value));function x(){m.push(E.flowRuns())}const b=u(()=>{var s;return(s=t.value)==null?void 0:s.stateType});q(b);const F=u(()=>t.value?`Flow Run: ${t.value.name}`:"Flow Run");return J(F),(s,r)=>{const S=f("p-code-highlight"),T=f("p-tabs"),D=f("p-layout-well");return o(),a(D,{class:"flow-run"},{header:l(()=>[e(t)?(o(),a(e(H),{key:0,"flow-run-id":e(t).id,onDelete:x},null,8,["flow-run-id"])):n("",!0)]),well:l(()=>[e(t)?(o(),a(e(d),{key:0,"flow-run":e(t),alternate:""},null,8,["flow-run"])):n("",!0)]),default:l(()=>[e(t)?(o(),a(e(K),{key:0,"flow-run":e(t)},null,8,["flow-run"])):n("",!0),_(T,{selected:c.value,"onUpdate:selected":r[0]||(r[0]=C=>c.value=C),tabs:e(y)},{details:l(()=>[e(t)?(o(),a(e(d),{key:0,"flow-run":e(t)},null,8,["flow-run"])):n("",!0)]),logs:l(()=>[e(t)?(o(),a(e(M),{key:0,"flow-run":e(t)},null,8,["flow-run"])):n("",!0)]),results:l(()=>[e(t)?(o(),a(e(O),{key:0,"flow-run":e(t)},null,8,["flow-run"])):n("",!0)]),artifacts:l(()=>[e(t)?(o(),a(e(U),{key:0,"flow-run":e(t)},null,8,["flow-run"])):n("",!0)]),"task-runs":l(()=>[e(t)?(o(),a(e(X),{key:0,"flow-run-id":e(t).id},null,8,["flow-run-id"])):n("",!0)]),"subflow-runs":l(()=>[e(t)?(o(),a(e(Y),{key:0,"flow-run-id":e(t).id},null,8,["flow-run-id"])):n("",!0)]),parameters:l(()=>[e(w)?(o(),a(e(z),{key:0,"text-to-copy":e(i)},{default:l(()=>[_(S,{lang:"json",text:e(i),class:"flow-run__parameters"},null,8,["text"])]),_:1},8,["text-to-copy"])):n("",!0)]),_:1},8,["selected","tabs"])]),_:1})}}});export{ee as default};
