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