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