import{d as i,M as m,U as w,bk as Q,k as f,c as b,l,o as y,n as k,u as o,bl as h,bm as q,b3 as C,b2 as d}from"./index-gULJbqdd.js";import{u as g}from"./usePageTitle-HrbxxOEb.js";const B=i({__name:"WorkQueueEdit",async setup(x){let e,a;const r=m(),t=w("workQueueId"),u=([e,a]=Q(()=>r.workQueues.getWorkQueue(t.value)),e=await e,a(),e),s=()=>{C.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 g(`Edit Work Queue: ${u.name}`),(n,c)=>{const _=f("p-layout-default");return y(),b(_,null,{header:l(()=>[k(o(h),{"work-queue":o(u)},null,8,["work-queue"])]),default:l(()=>[k(o(q),{"work-queue":o(u),onSubmit:p,onCancel:s},null,8,["work-queue"])]),_:1})}}});export{B as default};
