module.exports=[96942,a=>{"use strict";var b=a.i(11475);a.s([],3463),a.i(3463),a.s(["0020b90013442ee70bfa6957af8198bcaaa2cb3579",()=>b.markNotificationsRead,"403bb56863884e13fa07f1a65a0cd7eacaf6c173b7",()=>b.createNotification],96942)},11475,a=>{"use strict";var b=a.i(37936),c=a.i(18558),d=a.i(66518),e=a.i(9307);async function f(){let a=await (0,e.requireAccess)("dashboard","read");await d.prisma.notification.updateMany({where:{userId:a.id,read:!1},data:{read:!0}}),(0,c.revalidatePath)("/notifications"),(0,c.revalidatePath)("/")}async function g(a){let b=await (0,e.requireAccess)("dashboard","write"),f=String(a.get("userId")??""),g=String(a.get("message")??"").trim();f&&g&&(await d.prisma.notification.create({data:{userId:f,message:g,type:a.get("type")??"INFO",link:a.get("link")?String(a.get("link")):null}}),await h(b.id,"Système"),(0,c.revalidatePath)("/notifications"))}async function h(b,c){let{logActivity:d}=await a.A(50636);await d({userId:b,action:"CREATION",entity:"Notification",details:c})}(0,a.i(13095).ensureServerEntryExports)([f,g]),(0,b.registerServerReference)(f,"0020b90013442ee70bfa6957af8198bcaaa2cb3579",null),(0,b.registerServerReference)(g,"403bb56863884e13fa07f1a65a0cd7eacaf6c173b7",null),a.s(["createNotification",0,g,"markNotificationsRead",0,f])},50636,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_activity_ts_1tns90n._.js"].map(b=>a.l(b))).then(()=>b(36580)))}];

//# sourceMappingURL=_19u46at._.js.map