import{d as B,al as R,W as $,t as D,b as s,am as F,b5 as T,b6 as U,bv as E,c as m,e as a,a as i,f as k,ar as H,o as d,g as t,h as e,cE as O,bZ as Q,cF as w,bh as V,cG as q,cH as A,by as G,a5 as I}from"./index-BjFilUfY.js";import{u as M}from"./usePageTitle-J4-vayug.js";const Z=B({__name:"WorkPool",setup(S){const b=R(),n=$("workPoolName"),f={interval:3e5},u=D(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:H.xl},{label:"Runs"},{label:"Work Queues"},{label:"Workers",hidden:c.value},{label:"Deployments"}]),r=F("tab","Details"),{tabs:_}=T(v,r),P=s(()=>{var l;return((l=o.value)==null?void 0:l.status)!=="ready"}),y=s(()=>{var l;return`prefect ${c.value?"agent":"worker"} start --pool "${(l=o.value)==null?void 0:l.name}"`}),{filter:h}=U({workPools:{name:[n.value]}}),{filter:W}=E({workPools:{name:[n.value]}}),C=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return M(C),(l,p)=>{const g=k("p-tabs"),x=k("p-layout-well");return o.value?(d(),m(x,{key:0,class:"work-pool"},{header:a(()=>[t(e(O),{"work-pool":o.value,onUpdate:e(u).refresh},null,8,["work-pool","onUpdate"]),P.value?(d(),m(e(Q),{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":p[0]||(p[0]=N=>I(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(h),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(G),{filter:e(W)},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):i("",!0)}}});export{Z as default};
//# sourceMappingURL=WorkPool-CIsTGBZi.js.map
