package fr.shortcircuit.tp9.web;

import java.io.Serializable;
import java.util.Map;
import java.util.TreeMap;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;


/** @author Dimitri Dean DARSEYNE (D3), 
 * Published by Short-Circuit under Creative Commons (CC) Licensing: 
 * Authorship/Paternity, NO Commercial Use, NO Derivative
 * Please check for more informations:
 * http://creativecommons.org/licenses/by-nc-nd/2.0/
 *
 * Auteur Dimitri Dean DARSEYNE (D3),
 * Publié par Short-Circuit sous license Creative Commons (CC):
 * Paternité, PAS d'Utilisation Commerciale, pas de Dérivés/Modifications
 * Pour plus d'informations, se rendre sur:
 * http://creativecommons.org/licenses/by-nc-nd/2.0/fr/ 
 * 
 * @since Short-Circuit 1999
 */

@ManagedBean(name="themeSwitcherBean")
@SessionScoped
public class ThemeSwitcherBean implements Serializable 
{
	private Map<String, String> 	themes = new TreeMap<String, String>();
	
	private String 					theme = "cupertino";
	
	
	public ThemeSwitcherBean()	{init();}


	//@PostConstruct
	public void init() 
	{
//Complete Themes		
//		
//		themes.put("Aristo", 			"aristo");
//		themes.put("Black-Tie", 		"black-tie");
//		themes.put("Blitzer", 			"blitzer");
//		themes.put("Bluesky", 			"bluesky");
//		themes.put("Casablanca",	 	"casablanca");
//		themes.put("Cupertino", 		"cupertino");
//		themes.put("Dark-Hive",		 	"dark-hive");
//		themes.put("Dot-Luv", 			"dot-luv");
//		themes.put("Eggplant", 			"eggplant");
//		themes.put("Excite-Bike", 		"excite-bike");
//		themes.put("Flick",		 		"flick");
//		themes.put("Glass-X", 			"glass-x");
//		themes.put("Hot-Sneaks", 		"hot-sneaks");
//		themes.put("Humanity", 			"humanity");
//		themes.put("Le-Frog", 			"le-frog");
//		themes.put("Midnight", 			"midnight");
//		themes.put("Mint-Choc", 		"mint-choc");
//		themes.put("Overcast", 			"overcast");
//		themes.put("Pepper-Grinder",	"pepper-grinder");
//		themes.put("Redmond", 			"redmond");
//		themes.put("Rocket", 			"rocket");
//		themes.put("Sam", 				"sam");
//		themes.put("Smoothness", 		"smoothness");
//		themes.put("South-Street", 		"south-street");
//		themes.put("Start", 			"start");
//		themes.put("Sunny", 			"sunny");
//		themes.put("Swanky-Purse", 		"swanky-purse");
//		themes.put("Trontastic", 		"trontastic");
//		themes.put("UI-Darkness", 		"ui-darkness");
//		themes.put("UI-Lightness", 		"ui-lightness");
//		themes.put("Vader", 			"vader");
	
		themes.put("0 - Aristo", 			"aristo");
		themes.put("1 - Bluesky", 			"bluesky");
		themes.put("2 - Cupertino", 		"cupertino");
		themes.put("3 - Redmond", 			"redmond");
		
		themes.put("4 - Black-Tie", 		"black-tie");
		themes.put("5 - Casablanca",	 	"casablanca");
		themes.put("6 - Humanity", 			"humanity");
		themes.put("7 - Sam", 				"sam");
		themes.put("8 - Smoothness", 		"smoothness");
		themes.put("9 - Sunny", 			"sunny");
	}

	public void setTheme(String theme) 					
	{	
		System.out.println("Theme: setTheme: theme=" + theme);
		
		this.theme 	= theme;
	}
	
	public Map<String, String> getThemes()				{return themes;}
	public String getTheme() 							{return theme;}

	public void setThemes(Map<String, String> themes) 	{this.themes 	= themes;}
}
