import{a as p}from"./chunk-F7JSNNOP.js";import{K as e,N as c,S as s,i as a,n,v as o}from"./chunk-NCBQEKN3.js";var v=class t{constructor(i){this.apiService=i}cargar(i){return this.apiService.getCached("notificaciones",{rol:i},3*6e4).pipe(n(r=>r.notificaciones??[]),o(()=>a([])))}descartar(i,r){return this.apiService.post(`notificaciones/${i}/descartar`,{}).pipe(e(()=>this.apiService.invalidate("notificaciones")))}descartarTodas(i){return this.apiService.post(`notificaciones/descartar-todas?rol=${encodeURIComponent(i)}`,{}).pipe(e(()=>this.apiService.invalidate("notificaciones")))}refrescar(i){return this.apiService.invalidate("notificaciones"),this.cargar(i)}cargarTodas(){return this.apiService.getCached("notificaciones",void 0,3*6e4).pipe(n(i=>i.notificaciones??[]),o(()=>a([])))}crear(i){return this.apiService.post("notificaciones",i).pipe(e(()=>this.apiService.invalidate("notificaciones")))}enviarFeedback(i){return this.apiService.post("notificaciones/feedback",i).pipe(e(()=>this.apiService.invalidate("notificaciones")))}eliminarDelServidor(i){return this.apiService.delete(`notificaciones/${i}`).pipe(e(()=>this.apiService.invalidate("notificaciones")))}static \u0275fac=function(r){return new(r||t)(s(p))};static \u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})};export{v as a};
