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