import{d as C,aF as h,W as v,ae as N,K as w,c,g as r,h as g,o as u,j as k,k as f,cS as x,cR as b,a as E,ca as l,bo as p,L as W}from"./index-BqDjVCF_.js";import{u as A}from"./usePageTitle-CZh_IXm2.js";const S=C({__name:"NotificationEdit",async setup(B){let t,n;const i=h(),e=v("notificationId"),a=N({...([t,n]=w(()=>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){W("Error updating notification","error"),console.warn(o)}}function _(){l.push(p.notifications())}return A("Edit Notification"),(s,o)=>{const m=g("p-layout-default");return u(),c(m,null,{header:r(()=>[k(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:_},null,8,["notification"])):E("",!0)]),_:1})}}});export{S as default};
//# sourceMappingURL=NotificationEdit-D5DqDDEY.js.map
