import{e as o}from"./chunk-KOULBGOK.js";import{da as m,h,ja as i}from"./chunk-ZGECHOBP.js";var e=function(t){return t.Dark="dark",t.Light="light",t}(e||{}),d=(()=>{class t{get currentTheme(){return this._document.body.getAttribute("data-theme")}constructor(r){this._document=r,this.currentTheme$$=new h(e.Light)}applyCurrentTheme(){document.body.setAttribute("data-theme",localStorage.getItem("theme")??e.Light)}applyDarkTheme(){document.body.setAttribute("data-theme",e.Dark),localStorage.setItem("theme",e.Dark),this.currentTheme$$.next(e.Dark)}applyLightTheme(){document.body.setAttribute("data-theme",e.Light),localStorage.setItem("theme",e.Light),this.currentTheme$$.next(e.Light)}setThemeBasedOnSystemPreference(){let r=localStorage.getItem("theme");r?r===e.Dark?this.applyDarkTheme():this.applyLightTheme():(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-theme":"light-theme")==="dark-theme"?this.applyDarkTheme():this.applyLightTheme()}static{this.\u0275fac=function(a){return new(a||t)(i(o))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})();export{e as a,d as b};
