import{d as D,i as L,j as o,ao as N,aA as P,v as S,aB as B,c as n,w as s,r as f,ah as A,aC as V,o as l,u as e,aD as j,m as u,aE as m,a as i,aF as E,aG as G,aH as H,aI as J}from"./index-4d9fe32c-718dc5d9.js";import{N as O}from"./prefect-design-a921a7c6.js";import{u as U,c as $}from"./vue-compositions-55710141.js";import{u as q}from"./usePageTitle-e8e2e29d.js";import"./index-558d177a.js";import{r as z}from"./routes-1bd54f1a.js";import"./meta-26546594.js";const ae=D({__name:"FlowRun",setup(K){const w=A(),c=L("Logs"),p=U("flowRunId"),d=o(()=>{const t=["Logs","Task Runs","Subflow Runs","Parameters"];return O.xl||t.push("Details"),t}),_=N(),v=$(_.flowRuns.getFlowRun,[p],{interval:3e4}),a=o(()=>v.response),y=o(()=>{var t;return(t=a.value)==null?void 0:t.deploymentId}),R=P(y);S(p,(t,r)=>{t!==r&&(c.value="Logs")});const b=o(()=>{var t;return((t=a.value)==null?void 0:t.parameters)??{}}),k=o(()=>{var t;return((t=R.value)==null?void 0:t.parameterOpenApiSchema)??{}}),g=o(()=>V(b.value,k.value));function h(){w.push(z.flowRuns())}const F=o(()=>{var t;return(t=a.value)==null?void 0:t.stateType});B(F);const T=o(()=>a.value?`Flow Run: ${a.value.name}`:"Flow Run");return q(T),(t,r)=>{const x=f("p-tabs"),C=f("p-layout-well");return l(),n(C,{class:"flow-run"},{header:s(()=>[e(a)?(l(),n(e(j),{key:0,"flow-run-id":e(a).id,onDelete:h},null,8,["flow-run-id"])):u("",!0)]),well:s(()=>[e(a)?(l(),n(e(m),{key:0,"flow-run":e(a),alternate:""},null,8,["flow-run"])):u("",!0)]),default:s(()=>[i(x,{selected:c.value,"onUpdate:selected":r[0]||(r[0]=I=>c.value=I),tabs:e(d)},{details:s(()=>[e(a)?(l(),n(e(m),{key:0,"flow-run":e(a)},null,8,["flow-run"])):u("",!0)]),logs:s(()=>[e(a)?(l(),n(e(E),{key:0,"flow-run":e(a)},null,8,["flow-run"])):u("",!0)]),"task-runs":s(()=>[e(a)?(l(),n(e(G),{key:0,"flow-run-id":e(a).id},null,8,["flow-run-id"])):u("",!0)]),"subflow-runs":s(()=>[e(a)?(l(),n(e(H),{key:0,"flow-run-id":e(a).id},null,8,["flow-run-id"])):u("",!0)]),parameters:s(()=>[i(e(J),{value:e(g)},null,8,["value"])]),_:1},8,["selected","tabs"])]),_:1})}}});export{ae as default};
