import{d as x,b as R,W as T,t as D,e as s,Q as $,ao as j,ap as Q,aP as S,c as m,g as a,a as i,h as k,T as U,o as d,n as t,j as e,b_ as F,bj as M,b$ as w,aB as V,c0 as q,c1 as A,aS as L,y as O}from"./index-CPxpbp4R.js";import{u as Y}from"./usePageTitle-CcH2lmI6.js";const H=x({__name:"WorkPool",setup(z){const b=R(),n=T("workPoolName"),f={interval:3e5},u=D(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:U.xl},{label:"Runs"},{label:"Work Queues"},{label:"Workers",hidden:p.value},{label:"Deployments"}]),r=$("tab","Details"),{tabs:_}=j(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}=Q({workPools:{name:[n.value]}}),{filter:h}=S({workPools:{name:[n.value]}}),C=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return Y(C),(l,c)=>{const g=k("p-tabs"),B=k("p-layout-well");return o.value?(d(),m(B,{key:0,class:"work-pool"},{header:a(()=>[t(e(F),{"work-pool":o.value,onUpdate:e(u).refresh},null,8,["work-pool","onUpdate"]),P.value?(d(),m(e(M),{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(g,{selected:e(r),"onUpdate:selected":c[0]||(c[0]=N=>O(r)?r.value=N:null),tabs:e(_)},{details:a(()=>[t(e(w),{"work-pool":o.value},null,8,["work-pool"])]),runs:a(()=>[t(e(V),{filter:e(W),prefix:"runs"},null,8,["filter"])]),"work-queues":a(()=>[t(e(q),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),workers:a(()=>[t(e(A),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),deployments:a(()=>[t(e(L),{filter:e(h)},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):i("",!0)}}});export{H as default};
//# sourceMappingURL=WorkPool-Jz4eRcFx.js.map
