import { Injectable } from '@angular/core';
import { StorageService } from 'src/app/services/storage.service';

@Injectable({
  providedIn: 'root'
})
export class ThemeService {

  themes = [
    'gov',
    'default',
    'tribunal'
  ]

  currentTheme = 'gov'

  constructor(private storageservice: StorageService) { }

  setTheme(theme: 'gov' | 'default' | 'tribunal') {

    document.body.classList.remove("gov");
    document.body.classList.remove("default");
    document.body.classList.remove("tribunal");
    document.body.classList.add(theme);
    this.currentTheme = theme
    console.log('Current theme', theme);
    this.storageservice.store('theme',theme);

  }

}
