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