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