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