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