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