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