import{d as I,u as y,a as C,e,J as D,g as c,j as a,o as $,h as x,w as n,i as u,V as S,W as i,X as A,Q as F,s as N,n as V,G as W}from"./index.ace9693c.js";import{u as B}from"./useRouteParam.1483cbc1.js";import{u as p}from"./useSubscriptionWithDependencies.3c89067d.js";import{u as J}from"./usePageTitle.12638eb5.js";const X=I({__name:"TaskRun",setup(P){const k=y(),l=B("id"),r=C(),m=e(()=>{const s=["Logs","Task Inputs"];return V.xl||s.push("Details"),s}),_=e(()=>l.value?[l.value]:null),f=p(r.taskRuns.getTaskRun,_),t=e(()=>f.response),o=e(()=>{var s;return(s=t.value)==null?void 0:s.flowRunId}),R=e(()=>o.value?[o.value]:null),d=p(r.flowRuns.getFlowRun,R),v=e(()=>{var s;return(s=t.value)!=null&&s.taskInputs?JSON.stringify(t.value.taskInputs,void 0,2):"{}"});function w(){d.refresh(),k.push(W.flowRun(o.value))}const g=e(()=>{var s;return(s=t.value)==null?void 0:s.stateType});D(g);const T=e(()=>t.value?`Task Run: ${t.value.name}`:"Task Run");return J(T),(s,j)=>{const b=c("p-tabs"),h=c("p-layout-well");return a(t)?($(),x(h,{key:0,class:"task-run"},{header:n(()=>[u(a(S),{"task-run":a(t),onDelete:w},null,8,["task-run"])]),well:n(()=>[u(a(i),{alternate:"","task-run":a(t)},null,8,["task-run"])]),default:n(()=>[u(b,{tabs:a(m)},{details:n(()=>[u(a(i),{"task-run":a(t)},null,8,["task-run"])]),logs:n(()=>[u(a(A),{"task-run":a(t)},null,8,["task-run"])]),"task-inputs":n(()=>[u(a(F),{value:a(v)},null,8,["value"])]),_:1},8,["tabs"])]),_:1})):N("",!0)}}});export{X as default};
