import{d as A,W as B,g as V,f as s,al as j,bt as E,bG as b,bH as F,c as i,i as a,a as c,j as p,u as G,aL as J,o as k,k as n,l as e,bI as U,bJ as _,E as W,C as R,bK as Y,t as Z,G as H,bL as K,bM as M,bE as O,a6 as P,bk as X}from"./index-BBlvj0M_.js";import{u as $}from"./usePageTitle-lBdMRcrQ.js";const tt=A({__name:"TaskRun",setup(q){const g=G(),d=B("taskRunId"),v=V(),m=s(()=>[{label:"Details",hidden:J.xl},{label:"Logs"},{label:"Artifacts"},{label:"Task Inputs"}]),l=j("tab","Logs"),{tabs:I}=E(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(X.flowRun(r.value))}F(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"),L=p("p-layout-well");return t.value?(k(),i(L,{key:0,class:"task-run"},{header:a(()=>[n(e(U),{"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(S,{selected:e(l),"onUpdate:selected":o[0]||(o[0]=N=>P(l)?l.value=N:null),tabs:e(I)},W({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(M),{key:0,"task-run":t.value},null,8,["task-run"])):c("",!0)]),"task-inputs":a(()=>[t.value?(k(),i(e(O),{key:0,"text-to-copy":f.value},{default:a(()=>[n(C,{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(Y),{title:"Task Inputs"},{default:a(()=>[R(Z(e(H).info.taskInput),1)]),_:1})]),key:"0"}:void 0]),1032,["selected","tabs"])]),_:1})):c("",!0)}}});export{tt as default};
//# sourceMappingURL=TaskRun-4Lwxjn-O.js.map
