export class Theme {
  code: string;
  name: string;

  constructor(code: string, name: string) {
    this.code = code;
    this.name = name;
  }

  static findByCode(code: string): Theme {
    return Theme.THEMES.find(theme => theme.code === code) || Theme.DEFAULT_THEME;
  }

  static readonly THEMES: Theme[] = [
    new Theme('light', 'Hell'),
    new Theme('dark', 'Dunkel'),
    new Theme('system', 'System'),
  ];

  static readonly DEFAULT_THEME = Theme.THEMES[2];
}
