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