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