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