import{a as i,x as w,b as m,aU as f,f as Q,w as l,g as x,o as y,j as p,u as a,aV as h,aW as C,aC as g,aB as d}from"./index-e7fdb3d4.js";import{u as q}from"./usePageTitle-df55e3a5.js";const b=i({__name:"WorkQueueEdit",async setup(W){let e,o;const r=w(),t=m("workQueueId"),u=([e,o]=f(()=>r.workQueues.getWorkQueue(t.value)),e=await e,o(),e),s=()=>{g.back()},k=async n=>{try{await r.workQueues.updateWorkQueue(t.value,n),d(`${u.name} updated`,"success"),s()}catch(c){d("Error occurred while updating your queue","error"),console.error(c)}};return q(`Edit Work Queue: ${u.name}`),(n,c)=>{const _=x("p-layout-default");return y(),Q(_,null,{header:l(()=>[p(a(h),{"work-queue":a(u)},null,8,["work-queue"])]),default:l(()=>[p(a(C),{"work-queue":a(u),onSubmit:k,onCancel:s},null,8,["work-queue"])]),_:1})}}});export{b as default};
