import{d as i,v as w,E as m,aX as f,a as Q,e as y,w as l,o as h,m as p,g as a,aY as g,aZ as q,aG as v,aF as d}from"./index-a91efef8.js";import{u as C}from"./usePageTitle-6b86fe3b.js";const B=i({__name:"WorkQueueEdit",async setup(E){let e,o;const t=w(),r=m("workQueueId"),u=([e,o]=f(()=>t.workQueues.getWorkQueue(r.value)),e=await e,o(),e),s=()=>{v.back()},_=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 C(`Edit Work Queue: ${u.name}`),(n,c)=>{const k=Q("p-layout-default");return h(),y(k,null,{header:l(()=>[p(a(g),{"work-queue":a(u)},null,8,["work-queue"])]),default:l(()=>[p(a(q),{"work-queue":a(u),onSubmit:_,onCancel:s},null,8,["work-queue"])]),_:1})}}});export{B as default};
