import{d as W,u as $,c as a,a as C,al as R,V as x,e as N,N as T,r as c,o as s,f as r,w as t,g as e,ar as F,h as n,k as l,as as U,at as _,au as V,Z as B,t as D,C as P,ac as S}from"./index.647f6a83.js";import{u as z}from"./useRouteParam.58df0b75.js";import{u as A}from"./useToast.c994e702.js";const E=W({__name:"WorkQueue",setup(I){const k=$(),m=A(),p=a(()=>{const o=["Upcoming Runs","Runs"];return P.xl||o.unshift("Details"),o}),f=z("id"),w=a(()=>`prefect agent start ${u.value?` --work-queue "${u.value.name}"`:""}`),d={interval:3e5},i=C(R.getWorkQueue,[f.value],d),u=a(()=>i.response),Q=a(()=>u.value?[u.value.name]:[]),q=x({workQueues:Q}),v=()=>{k.push(D.workQueues())},b=a(()=>u.value?`Work Queue: ${u.value.name}`:"Work Queue");return N(b),T(()=>{var o;return(o=u.value)==null?void 0:o.deprecated},o=>{o&&m(S.info.deprecatedWorkQueue,"default",{dismissible:!1,timeout:!1})}),(o,O)=>{const y=c("p-tabs"),h=c("p-layout-well"),g=c("p-layout-default");return s(),r(g,{class:"work-queue"},{header:t(()=>[e(u)?(s(),r(e(F),{key:0,"work-queue":e(u),onUpdate:e(i).refresh,onDelete:v},null,8,["work-queue","onUpdate"])):n("",!0)]),default:t(()=>[l(h,{class:"work-queue__body"},{header:t(()=>[l(e(U),{command:e(w),title:"Work queue is ready to go!",subtitle:"Work queues define the work to be done and agents poll a specific work queue for new work."},null,8,["command"])]),well:t(()=>[e(u)?(s(),r(e(_),{key:0,alternate:"","work-queue":e(u)},null,8,["work-queue"])):n("",!0)]),default:t(()=>[l(y,{tabs:e(p)},{details:t(()=>[e(u)?(s(),r(e(_),{key:0,"work-queue":e(u)},null,8,["work-queue"])):n("",!0)]),"upcoming-runs":t(()=>[e(u)?(s(),r(e(V),{key:0,"work-queue":e(u)},null,8,["work-queue"])):n("",!0)]),runs:t(()=>[l(e(B),{"flow-run-filter":e(q)},null,8,["flow-run-filter"])]),_:1},8,["tabs"])]),_:1})]),_:1})}}});export{E as default};
