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