import{d as R,e as V,W as d,h as o,f,by as I,ao as S,bx as T,c as D,i as a,a as O,j as p,aO as Y,o as j,k as u,l as e,d4 as A,cV as E,d5 as v,a6 as F,d6 as H,bH as Z}from"./index-CibiDZQv.js";import{u as z}from"./usePageTitle-DYAZWMh1.js";const L=R({__name:"WorkPoolQueue",setup(G){const c=V(),l=d("workPoolName"),_=o(()=>[l.value]),r=d("workPoolQueueName"),b=o(()=>[r.value]),k={interval:3e5},i=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),t=o(()=>i.response),P=f(c.workPools.getWorkPoolByName,[l.value],k),q=o(()=>P.response),w=o(()=>{var n;return((n=q.value)==null?void 0:n.type)==="prefect-agent"}),g=o(()=>t.value?`Your work pool ${t.value.name} is ready to go!`:"Your work queue is ready to go!"),y=o(()=>`prefect ${w.value?"agent":"worker"} start --pool "${l.value}" --work-queue "${r.value}"`),N=o(()=>`Work queues are scoped to a work pool to allow ${w.value?"agents":"workers"} to pull from groups of queues with different priorities.`),{filter:Q}=I({workPoolQueues:{name:b},workPools:{name:_}}),W=o(()=>[{label:"Details",hidden:Y.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=S("tab","Details"),{tabs:x}=T(W,s),B=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return z(B),(n,m)=>{const $=p("p-tabs"),h=p("p-layout-well"),C=p("p-layout-default");return t.value?(j(),D(C,{key:0,class:"work-pool-queue"},{header:a(()=>[u(e(A),{"work-pool-queue":t.value,"work-pool-name":e(l),onUpdate:e(i).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:a(()=>[u(h,{class:"work-pool-queue__body"},{header:a(()=>[u(e(E),{command:y.value,title:g.value,subtitle:N.value},null,8,["command","title","subtitle"])]),well:a(()=>[u(e(v),{alternate:"","work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),default:a(()=>[u($,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=U=>F(s)?s.value=U:null),tabs:e(x)},{details:a(()=>[u(e(v),{"work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),"upcoming-runs":a(()=>[u(e(H),{"work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[u(e(Z),{filter:e(Q),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):O("",!0)}}});export{L as default};
//# sourceMappingURL=WorkPoolQueue-X_YpiHua.js.map
