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