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