import{d as i,al as w,W as m,B as f,c as Q,e as l,f as h,o as y,g as _,h as o,c2 as W,c3 as g,bN as q,_ as d}from"./index-BjFilUfY.js";import{u as C}from"./usePageTitle-J4-vayug.js";const v=i({__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=()=>{q.back()},p=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=h("p-layout-default");return y(),Q(k,null,{header:l(()=>[_(o(W),{"work-queue":o(u)},null,8,["work-queue"])]),default:l(()=>[_(o(g),{"work-queue":o(u),onSubmit:p,onCancel:s},null,8,["work-queue"])]),_:1})}}});export{v as default};
//# sourceMappingURL=WorkQueueEdit-Cjal3Prt.js.map
