import{d as k,ao as m,e as w,r as f,o as Q,f as h,w as c,k as l,g as o,ap as y,aq as q,al as _,a5 as g,a4 as i}from"./index.52551726.js";import{u as C}from"./useRouteParam.4bc8e74f.js";const v=k({__name:"WorkQueueEdit",async setup(x){let e,u;const t=C("id"),a=([e,u]=m(()=>_.getWorkQueue(t.value)),e=await e,u(),e),r=()=>{g.back()},p=async s=>{try{await _.updateWorkQueue(t.value,s),i(`${a.name} updated`,"success"),r()}catch(n){i("Error occurred while updating your queue","error"),console.error(n)}};return w(`Edit Work Queue: ${a.name}`),(s,n)=>{const d=f("p-layout-default");return Q(),h(d,null,{header:c(()=>[l(o(y),{"work-queue":o(a)},null,8,["work-queue"])]),default:c(()=>[l(o(q),{"work-queue":o(a),onSubmit:p,onCancel:r},null,8,["work-queue"])]),_:1})}}});export{v as default};
