import{d as B,aE as R,W as U,t as D,e as s,am as $,bs as E,bt as V,bR as A,c as m,f as a,a as i,g as k,aN as F,o as d,h as t,i as e,c$ as Q,ck as T,d0 as w,bD as q,d1 as I,d2 as J,bU as O,a5 as S}from"./index-BOEdKJ1D.js";import{u as X}from"./usePageTitle-BkurcLK2.js";const G=B({__name:"WorkPool",setup(Y){const f=R(),n=U("workPoolName"),b={interval:3e5},u=D(f.workPools.getWorkPoolByName,[n.value],b),o=s(()=>u.response),p=s(()=>{var l;return((l=o.value)==null?void 0:l.type)==="prefect-agent"}),v=s(()=>[{label:"Details",hidden:F.xl},{label:"Runs"},{label:"Work Queues"},{label:"Workers",hidden:p.value},{label:"Deployments"}]),r=$("tab","Details"),{tabs:_}=E(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}=V({workPools:{name:[n.value]}}),{filter:g}=A({workPools:{name:[n.value]}}),h=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return X(h),(l,c)=>{const C=k("p-tabs"),x=k("p-layout-well");return o.value?(d(),m(x,{key:0,class:"work-pool"},{header:a(()=>[t(e(Q),{"work-pool":o.value,onUpdate:e(u).refresh},null,8,["work-pool","onUpdate"]),P.value?(d(),m(e(T),{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(C,{selected:e(r),"onUpdate:selected":c[0]||(c[0]=N=>S(r)?r.value=N: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(I),{"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(O),{filter:e(g)},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):i("",!0)}}});export{G as default};
//# sourceMappingURL=WorkPool-D2eKWJUx.js.map
