import{d as C,g as v,W as w,ae as N,I as h,j as g,c,o as r,k as u,a as k,n as f,cz as x,l as E,cB as b,c7 as l,be as p,J as B}from"./index-DHPxdPUs.js";import{u as I}from"./usePageTitle-N_Vwn3MG.js";const z=C({__name:"NotificationEdit",async setup(V){let t,n;const i=v(),e=w("notificationId"),a=N({...([t,n]=h(()=>i.notifications.getNotification(e.value)),t=await t,n(),t)});async function d(s){try{await i.notifications.updateNotification(e.value,s),l.push(p.notifications())}catch(o){B("Error updating notification","error"),console.warn(o)}}function _(){l.push(p.notifications())}return I("Edit Notification"),(s,o)=>{const m=g("p-layout-default");return r(),c(m,null,{header:u(()=>[E(f(b))]),default:u(()=>[a.value?(r(),c(f(x),{key:0,notification:a.value,"onUpdate:notification":o[0]||(o[0]=y=>a.value=y),onSubmit:d,onCancel:_},null,8,["notification"])):k("",!0)]),_:1})}}});export{z as default};
//# sourceMappingURL=NotificationEdit-DZ3M3sE0.js.map
