import{d as p,g as d,p as o}from"./chunk-ZTKV4AIV.js";import{c as y}from"./chunk-5JDCLYZA.js";import{h as l}from"./chunk-73IMXZSJ.js";import{K as a,aa as c,bb as f,cb as g,ha as h,i as r,m as n,ma as m}from"./chunk-FWZCAEAJ.js";var w=(()=>{let t=class t{constructor(i){this.httpClient=i,this.url="/system-notification",this.storageKey="ignoredSystemNotifications",this.triggerGet$=new r(!0),this.allSystemNotifications=y(this.triggerGet$.pipe(c(()=>this.httpClient.get(this.url)),a(()=>n)),{initialValue:[]}),this.ignoredSystemNotifications=g(JSON.parse(d(this.storageKey)??"[]")??[]),this.getFilteredSystemNotifications=f(()=>this.allSystemNotifications().filter(s=>!this.ignoredSystemNotifications().includes(s.id)))}ignore(i){let s=this.ignoredSystemNotifications().slice();s.push(i),this.ignoredSystemNotifications.set(s),o(this.storageKey,JSON.stringify(this.ignoredSystemNotifications()),60*60*24*14)}ignoreAll(){this.ignoredSystemNotifications.set(this.allSystemNotifications().map(i=>i.id)),o(this.storageKey,JSON.stringify(this.ignoredSystemNotifications()),60*60*24*14)}resetIgnore(){p(this.storageKey),this.ignoredSystemNotifications.set([])}};t.\u0275fac=function(s){return new(s||t)(m(l))},t.\u0275prov=h({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();export{w as a};
