import {Component, OnInit} from '@angular/core'; import {ConfigService} from "../../services/config.service"; @Component({ selector: 'framadate-theme-selector', templateUrl: './theme-selector.component.html', styleUrls: ['./theme-selector.component.scss'] }) export class ThemeSelectorComponent implements OnInit { constructor(public config: ConfigService) { } ngOnInit(): void { } selectTheme(themeName: string) { if (this.config.themeChoices.includes(themeName)) { this.config.themeSelected = this.config.themeChoices.indexOf(themeName); this.config.themeClass = `theme-${themeName}`; } } }