import{d as C,u as A,v as V,S as H,f as s,aJ as J,al as L,bv as j,bH as f,bI as F,g as r,c as i,a as c,o as p,h as a,i as n,m as e,a6 as z,G as E,bA as G,bJ as K,bK as M,bL as b,D as _,bM as O,t as P,H as U,bN as $,bg as q}from"./index-B8dvxl4J.js";import{u as Q}from"./usePageTitle-BP6ee6do.js";const tt=C({__name:"TaskRun",setup(W){const R=A(),k=V("taskRunId"),d=H(),g=s(()=>[{label:"Details",hidden:J.xl},{label:"Logs"},{label:"Artifacts"},{label:"Task Inputs"}]),u=L("tab","Logs"),{tabs:m}=j(g,u),w=s(()=>k.value?[k.value]:null),I=f(d.taskRuns.getTaskRun,w,{interval:3e4}),t=s(()=>I.response),o=s(()=>t.value?.flowRunId),h=s(()=>o.value?[o.value]:null),T=f(d.flowRuns.getFlowRun,h),v=s(()=>t.value?.taskInputs?JSON.stringify(t.value.taskInputs,void 0,2):"{}");function y(){T.refresh(),R.push(q.flowRun(o.value))}F(t);const x=s(()=>t.value?`Task Run: ${t.value.name}`:"Task Run");return Q(x),(X,l)=>{const D=r("p-code-highlight"),S=r("p-tabs"),N=r("p-layout-well");return t.value?(p(),i(N,{key:0,class:"task-run"},{header:a(()=>[n(e($),{"task-run-id":t.value.id,onDelete:y},null,8,["task-run-id"])]),well:a(()=>[n(e(b),{alternate:"","task-run":t.value},null,8,["task-run"])]),default:a(()=>[n(S,{selected:e(u),"onUpdate:selected":l[0]||(l[0]=B=>z(u)?u.value=B:null),tabs:e(m)},E({details:a(()=>[n(e(b),{"task-run":t.value},null,8,["task-run"])]),logs:a(()=>[n(e(M),{"task-run":t.value},null,8,["task-run"])]),artifacts:a(()=>[t.value?(p(),i(e(K),{key:0,"task-run":t.value},null,8,["task-run"])):c("",!0)]),"task-inputs":a(()=>[t.value?(p(),i(e(G),{key:0,"text-to-copy":v.value},{default:a(()=>[n(D,{lang:"json",text:v.value,class:"task-run__inputs"},null,8,["text"])]),_:1},8,["text-to-copy"])):c("",!0)]),_:2},[t.value?{name:"task-inputs-heading",fn:a(()=>[l[1]||(l[1]=_(" Task inputs ",-1)),n(e(O),{title:"Task Inputs"},{default:a(()=>[_(P(e(U).info.taskInput),1)]),_:1})]),key:"0"}:void 0]),1032,["selected","tabs"])]),_:1})):c("",!0)}}});export{tt as default};
//# sourceMappingURL=TaskRun-pkemO-jL.js.map
