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