import{d as m,X as k,r as w,o as f,b as h,w as c,i as _,e as o,Y as y,V as Q,T as l,Z as C,W as i}from"./index.a93ec448.js";import{u as x}from"./useRouteParam.ba3137c3.js";const q=m({__name:"WorkQueueEdit",async setup(W){let e,a;const t=x("id"),u=([e,a]=k(()=>l.getWorkQueue(t.value)),e=await e,a(),e),r=()=>{C.back()},p=async s=>{try{await l.updateWorkQueue(t.value,s),i(`${u.name} updated`,"success"),r()}catch(n){i("Error occurred while updating your queue","error"),console.error(n)}};return(s,n)=>{const d=w("p-layout-default");return f(),h(d,null,{header:c(()=>[_(o(y))]),default:c(()=>[_(o(Q),{"work-queue":o(u),onSubmit:p,onCancel:r},null,8,["work-queue"])]),_:1})}}});export{q as default};
