import{d as h,v as y,W as C,af as N,J as w,c as s,g as r,h as g,o as u,j as k,k as f,cG as x,cF as b,a as E,cc as l,bo as p,L as I}from"./index-Bp1Bhxow.js";import{u as B}from"./usePageTitle-CccNdtFw.js";const z=h({__name:"NotificationEdit",async setup(V){let t,i;const n=y(),e=C("notificationId"),a=N({...([t,i]=w(()=>n.notifications.getNotification(e.value)),t=await t,i(),t)});async function d(c){try{await n.notifications.updateNotification(e.value,c),l.push(p.notifications())}catch(o){I("Error updating notification","error"),console.warn(o)}}function _(){l.push(p.notifications())}return B("Edit Notification"),(c,o)=>{const m=g("p-layout-default");return u(),s(m,null,{header:r(()=>[k(f(x))]),default:r(()=>[a.value?(u(),s(f(b),{key:0,notification:a.value,"onUpdate:notification":o[0]||(o[0]=v=>a.value=v),onSubmit:d,onCancel:_},null,8,["notification"])):E("",!0)]),_:1})}}});export{z as default};
//# sourceMappingURL=NotificationEdit-COQ6OQ_T.js.map
