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