import{ad as i,ae as o,V as a,af as s,ag as u}from"./index-CHfgriyV.js";import{u as r}from"./useMutation-DgMLlnbr.js";function m(){const e=i();return r({mutationFn:async(...t)=>{if((await e.ensureQueryData(a())).demo_mode)throw new Error("It is not possible to mark notifications as read in demo mode.");return s(...t)},onSuccess:()=>{e.invalidateQueries({queryKey:o.notifications()})}})}function y(){const e=i();return r({mutationFn:async(...t)=>{if((await e.ensureQueryData(a())).demo_mode)throw new Error("It is not possible to change the alerting configuration in demo mode.");return u(...t)},onMutate:({enabled:t,email_report:n})=>{e.setQueryData(o.servicesAlerting(),{__type:"ok",configuration:{enabled:t,email_report:n}})},onError:()=>{e.invalidateQueries({queryKey:o.servicesAlerting()})}})}export{y as a,m as u};
