import{d as h,ao as v,i as w,b as C,c as s,w as c,r as N,o as u,a as b,u as f,bG as x,bF as g,m as k}from"./index-4d9fe32c-718dc5d9.js";import{L as E}from"./prefect-design-a921a7c6.js";import{u as V}from"./vue-compositions-55710141.js";import{u as B}from"./usePageTitle-e8e2e29d.js";import{r as m}from"./index-558d177a.js";import{r as p}from"./routes-1bd54f1a.js";import"./meta-26546594.js";const U=h({__name:"NotificationEdit",async setup(I){let t,a;const n=v(),e=V("notificationId"),i=w({...([t,a]=C(()=>n.notifications.getNotification(e.value)),t=await t,a(),t)});async function l(r){try{await n.notifications.updateNotification(e.value,r),m.push(p.notifications())}catch(o){E("Error updating notification","error"),console.warn(o)}}function d(){m.push(p.notifications())}return B("Edit Notification"),(r,o)=>{const _=N("p-layout-default");return u(),s(_,null,{header:c(()=>[b(f(x))]),default:c(()=>[i.value?(u(),s(f(g),{key:0,notification:i.value,"onUpdate:notification":o[0]||(o[0]=y=>i.value=y),onSubmit:l,onCancel:d},null,8,["notification"])):k("",!0)]),_:1})}}});export{U as default};
