import{d as T,M as U,b as d,e as o,Y as f,an as Y,n as S,g as z,al as D,c as M,i as a,a as V,j as p,o as j,m as u,u as e,c3 as A,bd as F,c4 as v,z as J,c5 as O,aw as E}from"./index-bD6G21oH.js";import{u as G}from"./usePageTitle-27XdpEbQ.js";const L=T({__name:"WorkPoolQueue",setup(H){const c=U(),l=d("workPoolName"),_=o(()=>[l.value]),r=d("workPoolQueueName"),P=o(()=>[r.value]),k={interval:3e5},i=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),t=o(()=>i.response),b=f(c.workPools.getWorkPoolByName,[l.value],k),q=o(()=>b.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}"`),Q=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:N}=Y({workPoolQueues:{name:P},workPools:{name:_}}),B=o(()=>[{label:"Details",hidden:S.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=z("tab","Details"),{tabs:x}=D(B,s),C=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return G(C),(n,m)=>{const W=p("p-tabs"),$=p("p-layout-well"),h=p("p-layout-default");return t.value?(j(),M(h,{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($,{class:"work-pool-queue__body"},{header:a(()=>[u(e(F),{command:y.value,title:g.value,subtitle:Q.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(W,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=R=>J(s)?s.value=R: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(O),{"work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[u(e(E),{filter:e(N),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):V("",!0)}}});export{L as default};
