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