import{d as _,aE as w,W as m,G as f,c as Q,f as l,g as y,o as h,h as p,i as o,cp as q,cq as W,c7 as g,$ as d}from"./index-BOEdKJ1D.js";import{u as C}from"./usePageTitle-BkurcLK2.js";const v=_({__name:"WorkQueueEdit",async setup(x){let e,a;const r=w(),t=m("workQueueId"),u=([e,a]=f(()=>r.workQueues.getWorkQueue(t.value)),e=await e,a(),e),s=()=>{g.back()},i=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 C(`Edit Work Queue: ${u.name}`),(n,c)=>{const k=y("p-layout-default");return h(),Q(k,null,{header:l(()=>[p(o(q),{"work-queue":o(u)},null,8,["work-queue"])]),default:l(()=>[p(o(W),{"work-queue":o(u),onSubmit:i,onCancel:s},null,8,["work-queue"])]),_:1})}}});export{v as default};
//# sourceMappingURL=WorkQueueEdit-DZagVSJC.js.map
