import{d as N,_ as R,W as U,b as V,e as s,ao as $,bx as D,by as j,bW as F,c as m,f as a,a as i,g as k,aO as H,o as d,j as t,k as e,cU as I,cV as O,cW as w,bH as T,cX as Y,cY as Z,bZ as q,a6 as A}from"./index-BrFqolpA.js";import{u as E}from"./usePageTitle-CsnULHHx.js";const z=N({__name:"WorkPool",setup(Q){const b=R(),n=U("workPoolName"),f={interval:3e5},u=V(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=$("tab","Details"),{tabs:_}=D(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:W}=j({workPools:{name:[n.value]}}),{filter:g}=F({workPools:{name:[n.value]}}),x=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return E(x),(l,p)=>{const C=k("p-tabs"),h=k("p-layout-well");return o.value?(d(),m(h,{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(C,{selected:e(r),"onUpdate:selected":p[0]||(p[0]=B=>A(r)?r.value=B:null),tabs:e(_)},{details:a(()=>[t(e(w),{"work-pool":o.value},null,8,["work-pool"])]),runs:a(()=>[t(e(T),{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(Z),{"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{z as default};
//# sourceMappingURL=WorkPool-UOzN8COw.js.map
