import{d as B,aF as O,W as R,t as U,f as s,an as A,bv as D,bw as F,bU as V,c as m,g as a,a as d,h as i,aO as $,o as k,j as t,k as e,d2 as Q,cn as T,d3 as w,bG as j,d4 as q,d5 as E,bX as G,a5 as I}from"./index-BMRLX027.js";import{u as S}from"./usePageTitle-C6TtrEA6.js";const H=B({__name:"WorkPool",setup(X){const b=O(),n=R("workPoolName"),f={interval:3e5},u=U(b.workPools.getWorkPoolByName,[n.value],f),o=s(()=>u.response),p=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:p.value},{label:"Deployments"}]),r=A("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 ${p.value?"agent":"worker"} start --pool "${(l=o.value)==null?void 0:l.name}"`}),{filter:W}=F({workPools:{name:[n.value]}}),{filter:h}=V({workPools:{name:[n.value]}}),g=s(()=>o.value?`Work Pool: ${o.value.name}`:"Work Pool");return S(g),(l,c)=>{const x=i("p-tabs"),C=i("p-layout-well");return o.value?(k(),m(C,{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?(k(),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"])):d("",!0)]),well:a(()=>[t(e(w),{alternate:"","work-pool":o.value},null,8,["work-pool"])]),default:a(()=>[t(x,{selected:e(r),"onUpdate:selected":c[0]||(c[0]=N=>I(r)?r.value=N: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(E),{"work-pool-name":e(n)},null,8,["work-pool-name"])]),deployments:a(()=>[t(e(G),{filter:e(h)},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):d("",!0)}}});export{H as default};
//# sourceMappingURL=WorkPool-BS5ujWLi.js.map
