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