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