import{d as v,g as C,W as N,af as h,J as w,c as s,j as r,k as b,o as u,l as g,m as f,cG as k,cF as x,a as E,cc as l,bo as p,L as B}from"./index-DgpKcZLs.js";import{u as H}from"./usePageTitle-CgS480GG.js";const W=v({__name:"NotificationEdit",async setup(I){let t,n;const i=C(),e=N("notificationId"),a=h({...([t,n]=w(()=>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){B("Error updating notification","error"),console.warn(o)}}function m(){l.push(p.notifications())}return H("Edit Notification"),(c,o)=>{const _=b("p-layout-default");return u(),s(_,null,{header:r(()=>[g(f(k))]),default:r(()=>[a.value?(u(),s(f(x),{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{W as default};
//# sourceMappingURL=NotificationEdit-CopbgV1i.js.map
