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