import{d as F,aF as N,W as R,t as U,f as s,an as A,bv as D,bw as O,bU as $,c as m,g as a,a as d,h as i,aO as Q,o as k,j as t,k as e,d2 as S,cn as T,d3 as w,bG as V,d4 as X,d5 as j,bX as q,a5 as E}from"./index-BqDjVCF_.js";import{u as G}from"./usePageTitle-CZh_IXm2.js";const H=F({__name:"WorkPool",setup(I){const f=N(),n=R("workPoolName"),b={interval:3e5},u=U(f.workPools.getWorkPoolByName,[n.value],b),o=s(()=>u.response),p=s(()=>{var l;return((l=o.value)==null?void 0:l.type)==="prefect-agent"}),v=s(()=>[{label:"Details",hidden:Q.xl},{label:"Runs"},{label:"Work Queues"},{label:"Workers",hidden:p.value},{label:"Deployments"}]),r=A("tab","Details"),{tabs:_}=D(v,r),P=s(()=>{var l;return((l=o.value)==null?void 0:l.status)!=="ready"}),y=s(()=>{var l;return`prefect ${p.value?"agent":"worker"} start --pool "${(l=o.value)==null?void 0:l.name}"`}),{filter:W}=O({workPools:{name:[n.value]}}),{filter:g}=$({workPools:{name:[n.value]}}),h=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return G(h),(l,c)=>{const C=i("p-tabs"),x=i("p-layout-well");return o.value?(k(),m(x,{key:0,class:"work-pool"},{header:a(()=>[t(e(S),{"work-pool":o.value,onUpdate:e(u).refresh},null,8,["work-pool","onUpdate"]),P.value?(k(),m(e(T),{key:0,class:"work-pool__code-banner",command:y.value,title:"Your work pool is almost ready!",subtitle:"Run this command to start."},null,8,["command"])):d("",!0)]),well:a(()=>[t(e(w),{alternate:"","work-pool":o.value},null,8,["work-pool"])]),default:a(()=>[t(C,{selected:e(r),"onUpdate:selected":c[0]||(c[0]=B=>E(r)?r.value=B:null),tabs:e(_)},{details:a(()=>[t(e(w),{"work-pool":o.value},null,8,["work-pool"])]),runs:a(()=>[t(e(V),{filter:e(W),prefix:"runs"},null,8,["filter"])]),"work-queues":a(()=>[t(e(X),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),workers:a(()=>[t(e(j),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),deployments:a(()=>[t(e(q),{filter:e(g)},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):d("",!0)}}});export{H as default};
//# sourceMappingURL=WorkPool-DOK-1ls9.js.map
