import{d as _,M as m,b as w,bi as Q,c as f,i as l,j as b,o as y,m as d,u as o,bj as h,bk as q,b1 as x,b0 as k}from"./index-bD6G21oH.js";import{u as C}from"./usePageTitle-27XdpEbQ.js";const v=_({__name:"WorkQueueEdit",async setup(g){let e,a;const r=m(),t=w("workQueueId"),u=([e,a]=Q(()=>r.workQueues.getWorkQueue(t.value)),e=await e,a(),e),s=()=>{x.back()},i=async n=>{try{await r.workQueues.updateWorkQueue(t.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 p=b("p-layout-default");return y(),f(p,null,{header:l(()=>[d(o(h),{"work-queue":o(u)},null,8,["work-queue"])]),default:l(()=>[d(o(q),{"work-queue":o(u),onSubmit:i,onCancel:s},null,8,["work-queue"])]),_:1})}}});export{v as default};
