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