import{d as k,ao as _,b as w,c as f,w as l,r as Q,o as h,a as p,u,bk as y,bl as b}from"./index-4d9fe32c-718dc5d9.js";import{L as i}from"./prefect-design-a921a7c6.js";import{u as q}from"./vue-compositions-55710141.js";import{u as C}from"./usePageTitle-e8e2e29d.js";import{r as g}from"./index-558d177a.js";import"./routes-1bd54f1a.js";import"./meta-26546594.js";const V=k({__name:"WorkQueueEdit",async setup(x){let e,r;const t=_(),a=q("workQueueId"),o=([e,r]=w(()=>t.workQueues.getWorkQueue(a.value)),e=await e,r(),e),s=()=>{g.back()},m=async n=>{try{await t.workQueues.updateWorkQueue(a.value,n),i(`${o.name} updated`,"success"),s()}catch(c){i("Error occurred while updating your queue","error"),console.error(c)}};return C(`Edit Work Queue: ${o.name}`),(n,c)=>{const d=Q("p-layout-default");return h(),f(d,null,{header:l(()=>[p(u(y),{"work-queue":u(o)},null,8,["work-queue"])]),default:l(()=>[p(u(b),{"work-queue":u(o),onSubmit:m,onCancel:s},null,8,["work-queue"])]),_:1})}}});export{V as default};
