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