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