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