import{d as N,g as v,f as w,af as C,M as h,c,k as r,l as x,o as u,m as b,n as f,cF as g,cE as k,a as E,cb as l,bo as p,N as B}from"./index-CgvuCQfr.js";import{u as I}from"./usePageTitle-DVT0B9Gy.js";const A=N({__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(s){try{await i.notifications.updateNotification(e.value,s),l.push(p.notifications())}catch(o){B("Error updating notification","error"),console.warn(o)}}function m(){l.push(p.notifications())}return I("Edit Notification"),(s,o)=>{const _=x("p-layout-default");return u(),c(_,null,{header:r(()=>[b(f(g))]),default:r(()=>[a.value?(u(),c(f(k),{key:0,notification:a.value,"onUpdate:notification":o[0]||(o[0]=y=>a.value=y),onSubmit:d,onCancel:m},null,8,["notification"])):E("",!0)]),_:1})}}});export{A as default};
//# sourceMappingURL=NotificationEdit-BTZPhJgC.js.map
