import{d as D,h as N,W as O,t as R,j as s,ao as U,bx as V,by as $,bW as F,c as m,k as a,a as i,l as k,aO as Q,o as d,m as t,n as e,cU as T,cV as X,cW as w,bH as Y,cX as j,cY as q,bZ as A,a6 as E}from"./index-CKtbewUP.js";import{u as H}from"./usePageTitle-BJBko9bD.js";const z=D({__name:"WorkPool",setup(I){const b=N(),n=O("workPoolName"),f={interval:3e5},u=R(b.workPools.getWorkPoolByName,[n.value],f),o=s(()=>u.response),c=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:c.value},{label:"Deployments"}]),r=U("tab","Details"),{tabs:_}=V(v,r),y=s(()=>{var l;return((l=o.value)==null?void 0:l.status)!=="ready"}),P=s(()=>{var l;return`prefect ${c.value?"agent":"worker"} start --pool "${(l=o.value)==null?void 0:l.name}"`}),{filter:W}=$({workPools:{name:[n.value]}}),{filter:h}=F({workPools:{name:[n.value]}}),C=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return H(C),(l,p)=>{const x=k("p-tabs"),g=k("p-layout-well");return o.value?(d(),m(g,{key:0,class:"work-pool"},{header:a(()=>[t(e(T),{"work-pool":o.value,onUpdate:e(u).refresh},null,8,["work-pool","onUpdate"]),y.value?(d(),m(e(X),{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:a(()=>[t(e(w),{alternate:"","work-pool":o.value},null,8,["work-pool"])]),default:a(()=>[t(x,{selected:e(r),"onUpdate:selected":p[0]||(p[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(Y),{filter:e(W),prefix:"runs"},null,8,["filter"])]),"work-queues":a(()=>[t(e(j),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),workers:a(()=>[t(e(q),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),deployments:a(()=>[t(e(A),{filter:e(h)},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):i("",!0)}}});export{z as default};
//# sourceMappingURL=WorkPool-DkSFJxKV.js.map
