export default { data:()=>{ return{ theme: null, } }, methods:{ switchTheme(nextTheme){ this.theme = nextTheme; this.$theme.switchTheme(this.theme); }, }, computed:{ nextTheme(){ return this.$theme.theme_modes[(this.$theme.theme_modes.indexOf(this.theme) + 1) % this.$theme.theme_modes.length]; }, }, created(){ this.theme = localStorage.getItem('theme'); if (!this.theme || !this.$theme.theme_modes.includes(this.theme)) { this.theme = this.$theme.theme_modes[0]; } }, template:/*html*/` ` }