import{d as m,ap as k,e as w,r as f,o as Q,f as h,w as c,k as l,g as o,aq as y,ar as q,am as _,a6 as g,a5 as i}from"./index.c3b9a55d.js";import{u as C}from"./useRouteParam.b592fab0.js";const v=m({__name:"WorkQueueEdit",async setup(x){let e,u;const r=C("id"),a=([e,u]=k(()=>_.getWorkQueue(r.value)),e=await e,u(),e),t=()=>{g.back()},p=async s=>{try{await _.updateWorkQueue(r.value,s),i(`${a.name} updated`,"success"),t()}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:t},null,8,["work-queue"])]),_:1})}}});export{v as default};
