import{d as C,g as h,W as k,ae as v,J as N,c,i as r,j as g,o as u,k as w,l as f,cC as x,cB as b,a as B,c8 as l,bk as p,P as E}from"./index-BBlvj0M_.js";import{u as I}from"./usePageTitle-lBdMRcrQ.js";const j=C({__name:"NotificationEdit",async setup(P){let t,i;const n=h(),e=k("notificationId"),a=v({...([t,i]=N(()=>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=g("p-layout-default");return u(),c(m,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:_},null,8,["notification"])):B("",!0)]),_:1})}}});export{j as default};
//# sourceMappingURL=NotificationEdit-DavXRdwl.js.map
