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