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