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