import{d as _,b as k,f as m,Y as n,e as f,h as w,o as Q,i as h,w as c,p as i,j as a,a4 as v,a2 as b,a5 as y,a3 as p}from"./index.db417b3f.js";const q=_({name:"WorkQueueEdit",setup(C){const u=k("id"),d=m(n.getWorkQueue,[u.value]),r=f(()=>d.response),s=()=>{y.back()},l=async t=>{var e;try{await n.updateWorkQueue(u.value,t),p(`${(e=r.value)==null?void 0:e.name} updated`,"success",void 0,3e3),s()}catch(o){p("Error occurred while updating your queue","error",void 0,3e3),console.error(o)}};return(t,e)=>{const o=w("p-layout-default");return Q(),h(o,null,{header:c(()=>[i(a(v))]),default:c(()=>[i(a(b),{"work-queue":a(r),onSubmit:l,onCancel:s},null,8,["work-queue"])]),_:1})}}});export{q as default};
