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