import{d as A,u as B,v as J,S as L,g as s,aJ as V,al as F,bv as G,bH as f,bI as U,h as r,c as i,a as c,o as p,i as a,k as n,m as e,a6 as $,D as j,bA as z,bJ as H,bK as K,bL as b,B as _,bM as M,t as O,G as P,bN as q,bg as E}from"./index-CWv_Pcr2.js";import{u as Q}from"./usePageTitle-DY9DP8zZ.js";const tt=A({__name:"TaskRun",setup(W){const R=B(),k=J("taskRunId"),d=L(),g=s(()=>[{label:"Details",hidden:V.xl},{label:"Logs"},{label:"Artifacts"},{label:"Task Inputs"}]),u=F("tab","Logs"),{tabs:m}=G(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(E.flowRun(o.value))}U(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"),C=r("p-layout-well");return t.value?(p(),i(C,{key:0,class:"task-run"},{header:a(()=>[n(e(q),{"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]=N=>$(u)?u.value=N:null),tabs:e(m)},j({details:a(()=>[n(e(b),{"task-run":t.value},null,8,["task-run"])]),logs:a(()=>[n(e(K),{"task-run":t.value},null,8,["task-run"])]),artifacts:a(()=>[t.value?(p(),i(e(H),{key:0,"task-run":t.value},null,8,["task-run"])):c("",!0)]),"task-inputs":a(()=>[t.value?(p(),i(e(z),{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(M),{title:"Task Inputs"},{default:a(()=>[_(O(e(P).info.taskInput),1)]),_:1})]),key:"0"}:void 0]),1032,["selected","tabs"])]),_:1})):c("",!0)}}});export{tt as default};
//# sourceMappingURL=TaskRun-LqZFVmkK.js.map
