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