import{d as N,g as D,f as R,t as U,j as s,ao as V,bx as E,by as H,bV as T,c as m,k as a,a as i,l as k,aO as $,o as d,m as t,n as e,cT as F,cU as O,cV as w,bH as Q,cW as Y,cX as j,bY as q,a6 as A}from"./index-CgvuCQfr.js";import{u as I}from"./usePageTitle-DVT0B9Gy.js";const z=N({__name:"WorkPool",setup(S){const f=D(),n=R("workPoolName"),b={interval:3e5},u=U(f.workPools.getWorkPoolByName,[n.value],b),o=s(()=>u.response),c=s(()=>{var l;return((l=o.value)==null?void 0:l.type)==="prefect-agent"}),v=s(()=>[{label:"Details",hidden:$.xl},{label:"Runs"},{label:"Work Queues"},{label:"Workers",hidden:c.value},{label:"Deployments"}]),r=V("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 ${c.value?"agent":"worker"} start --pool "${(l=o.value)==null?void 0:l.name}"`}),{filter:W}=H({workPools:{name:[n.value]}}),{filter:h}=T({workPools:{name:[n.value]}}),x=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return I(x),(l,p)=>{const C=k("p-tabs"),g=k("p-layout-well");return o.value?(d(),m(g,{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(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(Q),{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(j),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),deployments:a(()=>[t(e(q),{filter:e(h)},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):i("",!0)}}});export{z as default};
//# sourceMappingURL=WorkPool-BVpUtXsP.js.map
