import{d as h,ao as y,j as e,aB as N,u as s,c as x,w as n,m as C,r as c,ah as D,o as B,a as u,aL as S,aM as p,aN as A,aI as F}from"./index-4d9fe32c-718dc5d9.js";import{N as J}from"./prefect-design-a921a7c6.js";import{u as L,v as i}from"./vue-compositions-55710141.js";import{u as P}from"./usePageTitle-e8e2e29d.js";import"./index-558d177a.js";import{r as V}from"./routes-1bd54f1a.js";import"./meta-26546594.js";const K=h({__name:"TaskRun",setup(j){const k=D(),l=L("taskRunId"),r=y(),m=e(()=>{const t=["Logs","Task Inputs"];return J.xl||t.push("Details"),t}),f=e(()=>l.value?[l.value]:null),v=i(r.taskRuns.getTaskRun,f,{interval:3e4}),a=e(()=>v.response),o=e(()=>{var t;return(t=a.value)==null?void 0:t.flowRunId}),d=e(()=>o.value?[o.value]:null),R=i(r.flowRuns.getFlowRun,d),_=e(()=>{var t;return(t=a.value)!=null&&t.taskInputs?JSON.stringify(a.value.taskInputs,void 0,2):"{}"});function w(){R.refresh(),k.push(V.flowRun(o.value))}const T=e(()=>{var t;return(t=a.value)==null?void 0:t.stateType});N(T);const I=e(()=>a.value?`Task Run: ${a.value.name}`:"Task Run");return P(I),(t,M)=>{const g=c("p-tabs"),b=c("p-layout-well");return s(a)?(B(),x(b,{key:0,class:"task-run"},{header:n(()=>[u(s(S),{"task-run-id":s(a).id,onDelete:w},null,8,["task-run-id"])]),well:n(()=>[u(s(p),{alternate:"","task-run":s(a)},null,8,["task-run"])]),default:n(()=>[u(g,{tabs:s(m)},{details:n(()=>[u(s(p),{"task-run":s(a)},null,8,["task-run"])]),logs:n(()=>[u(s(A),{"task-run":s(a)},null,8,["task-run"])]),"task-inputs":n(()=>[u(s(F),{value:s(_)},null,8,["value"])]),_:1},8,["tabs"])]),_:1})):C("",!0)}}});export{K as default};
