import { Component, OnInit } from '@angular/core'; import { <%= classify(elementName) %>Utils } from '<%= dasherize(scope) %>/<%= dasherize(workspace) %>-common'; import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject'; import { ThemeColorPickerService } from '@lcu/common'; @Component({ selector: 'lcu-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent implements OnInit { public ThemeClass: BehaviorSubject; public Themes: Array; public Title = 'LCU-Starter-App'; constructor( protected themeService: ThemeColorPickerService ) { } public ngOnInit(): void { this.Title = <%= classify(elementName) %>Utils.upper<%= classify(elementName) %>(this.Title); this.resetTheme(); this.setThemes(); } protected resetTheme(): void { this.ThemeClass = this.themeService.GetColorClass(); } public PickTheme(color: string): void { this.themeService.SetColorClass(`fathym-${color}-theme`); } protected setThemes(): void { this.Themes = [ { ColorSwatch: 'color-swatch-arctic', Icon: 'brightness_1', Label: 'Arctic Theme', Value: 'arctic-theme', Color: 'arctic' }, { ColorSwatch: 'color-swatch-contrast', Icon: 'brightness_1', Label: 'Contrast Theme', Value: 'contrast-theme', Color: 'contrast' }, { ColorSwatch: 'color-swatch-cool-candy', Icon: 'brightness_1', Label: 'Cool Candy Theme', Value: 'cool-candy-theme', Color: 'cool-candy' }, { ColorSwatch: 'color-swatch-flipper', Icon: 'brightness_1', Label: 'Flipper Theme', Value: 'flipper-theme', Color: 'flipper' }, { ColorSwatch: 'color-swatch-ice', Icon: 'brightness_1', Label: 'Ice Theme', Value: 'ice-theme', Color: 'ice' }, { ColorSwatch: 'color-swatch-sea-green', Icon: 'brightness_1', Label: 'Sea Green Theme', Value: 'sea-green-theme', Color: 'sea-green' }, { ColorSwatch: 'color-swatch-white-mint', Icon: 'brightness_1', Label: 'White Mint Theme', Value: 'white-mint-theme', Color: 'white-mint' }, { ColorSwatch: 'color-swatch-ivy', Icon: 'brightness_1', Label: 'Ivy Theme', Value: 'ivy-theme', Color: 'ivy' } ]; } public DisplayDetails(): void { console.log('DisplayDetails()'); } }