import{d as N,g as D,W as R,e as $,i as s,al as T,bt as U,bu as V,bS as z,c as m,j as a,a as i,k,aL as F,o as d,l as t,m as e,c_ as I,c$ as O,d0 as w,bD as S,d1 as Y,d2 as j,bV as q,a6 as A}from"./index-Cq5Q7kWk.js";import{u as K}from"./usePageTitle-NgGMZFeo.js";const E=N({__name:"WorkPool",setup(L){const b=D(),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"}),_=s(()=>[{label:"Details",hidden:F.xl},{label:"Runs"},{label:"Work Queues"},{label:"Workers",hidden:p.value},{label:"Deployments"}]),r=T("tab","Details"),{tabs:v}=U(_,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}=V({workPools:{name:[n.value]}}),{filter:g}=z({workPools:{name:[n.value]}}),C=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return K(C),(l,c)=>{const h=k("p-tabs"),x=k("p-layout-well");return o.value?(d(),m(x,{key:0,class:"work-pool"},{header:a(()=>[t(e(I),{"work-pool":o.value,onUpdate:e(u).refresh},null,8,["work-pool","onUpdate"]),P.value?(d(),m(e(O),{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"])):i("",!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]=B=>A(r)?r.value=B:null),tabs:e(v)},{details:a(()=>[t(e(w),{"work-pool":o.value},null,8,["work-pool"])]),runs:a(()=>[t(e(S),{filter:e(W),prefix:"runs"},null,8,["filter"])]),"work-queues":a(()=>[t(e(Y),{"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})):i("",!0)}}});export{E as default};
//# sourceMappingURL=WorkPool-BcuD5Vme.js.map
