import{d as B,g as N,W as R,h as $,i as s,aI as V,al as F,bt as I,bu as T,bR as U,j as i,c as m,a as k,o as d,k as a,l as t,p as e,a6 as O,bS as S,cZ as Z,c_ as j,bz as q,c$ as w,d0 as z,d1 as A}from"./index-Cixz26l0.js";import{u as K}from"./usePageTitle-BPkBun_K.js";const G=B({__name:"WorkPool",setup(Q){const b=N(),n=R("workPoolName"),f={interval:3e5},u=$(b.workPools.getWorkPoolByName,[n.value],f),o=s(()=>u.response),p=s(()=>{var l;return((l=o.value)==null?void 0:l.type)==="prefect-agent"}),v=s(()=>[{label:"Details",hidden:V.xl},{label:"Runs"},{label:"Work Queues"},{label:"Workers",hidden:p.value},{label:"Deployments"}]),r=F("tab","Details"),{tabs:_}=I(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}=T({workPools:{name:[n.value]}}),{filter:C}=U({workPools:{name:[n.value]}}),g=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return K(g),(l,c)=>{const h=i("p-tabs"),x=i("p-layout-well");return o.value?(d(),m(x,{key:0,class:"work-pool"},{header:a(()=>[t(e(z),{"work-pool":o.value,onUpdate:e(u).refresh},null,8,["work-pool","onUpdate"]),P.value?(d(),m(e(A),{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"])):k("",!0)]),well:a(()=>[t(e(w),{alternate:"","work-pool":o.value},null,8,["work-pool"])]),default:a(()=>[t(h,{selected:e(r),"onUpdate:selected":c[0]||(c[0]=D=>O(r)?r.value=D:null),tabs:e(_)},{details:a(()=>[t(e(w),{"work-pool":o.value},null,8,["work-pool"])]),runs:a(()=>[t(e(q),{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(Z),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),deployments:a(()=>[t(e(S),{filter:e(C)},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):k("",!0)}}});export{G as default};
//# sourceMappingURL=WorkPool-Dw0aDaDs.js.map
