import{d as C,g as v,W as N,ae as g,K as h,c,j as r,k,o as u,l as w,m as f,cC as x,cB as b,a as B,c8 as l,bk as p,P as E}from"./index-Cq5Q7kWk.js";import{u as I}from"./usePageTitle-NgGMZFeo.js";const W=C({__name:"NotificationEdit",async setup(P){let t,n;const i=v(),e=N("notificationId"),a=g({...([t,n]=h(()=>i.notifications.getNotification(e.value)),t=await t,n(),t)});async function d(s){try{await i.notifications.updateNotification(e.value,s),l.push(p.notifications())}catch(o){E("Error updating notification","error"),console.warn(o)}}function m(){l.push(p.notifications())}return I("Edit Notification"),(s,o)=>{const _=k("p-layout-default");return u(),c(_,null,{header:r(()=>[w(f(x))]),default:r(()=>[a.value?(u(),c(f(b),{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-IJtHvhlN.js.map
