package net.blay09.mods.eirairc.client.gui.config2;

import cpw.mods.fml.client.config.DummyConfigElement;
import cpw.mods.fml.client.config.GuiConfig;
import cpw.mods.fml.client.config.IConfigElement;
import net.blay09.mods.eirairc.config.ClientGlobalConfig;
import net.blay09.mods.eirairc.config.SharedGlobalConfig;
import net.blay09.mods.eirairc.util.Globals;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.common.config.ConfigElement;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Blay09 on 03.10.2014.
 */
public class EiraIRCConfigGUI extends GuiConfig {

	public EiraIRCConfigGUI(GuiScreen parentScreen) {
		super(parentScreen, getCategories(), Globals.MOD_ID, false, false, "EiraIRC Config");
	}

	@SuppressWarnings("unchecked") // why would he even complain here? o_O
	private static List<IConfigElement> getCategories() {
		List<IConfigElement> list = new ArrayList<IConfigElement>();
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.general.shared"), "eirairc:config.category.general.shared", new ConfigElement(SharedGlobalConfig.thisConfig.getCategory(SharedGlobalConfig.GENERAL)).getChildElements()));
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.general.client"), "eirairc:config.category.general.client", new ConfigElement(ClientGlobalConfig.thisConfig.getCategory(ClientGlobalConfig.GENERAL)).getChildElements()));
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.network"), "eirairc:config.category.network", new ConfigElement(SharedGlobalConfig.thisConfig.getCategory(SharedGlobalConfig.NETWORK)).getChildElements()));
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.screenshots"), "eirairc:config.category.screenshots", new ConfigElement(ClientGlobalConfig.thisConfig.getCategory(ClientGlobalConfig.SCREENSHOTS)).getChildElements()));
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.notifications"), "eirairc:config.category.notifications", new ConfigElement(ClientGlobalConfig.thisConfig.getCategory(ClientGlobalConfig.NOTIFICATIONS)).getChildElements()));
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.compatibility"), "eirairc:config.category.compatibility", new ConfigElement(ClientGlobalConfig.thisConfig.getCategory(ClientGlobalConfig.COMPATIBILITY)).getChildElements()));
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.theme"), "eirairc:config.category.theme", new ConfigElement(SharedGlobalConfig.thisConfig.getCategory(SharedGlobalConfig.THEME)).getChildElements()));
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.bot"), "eirairc:config.category.bot", new ConfigElement(SharedGlobalConfig.thisConfig.getCategory(SharedGlobalConfig.BOT)).getChildElements()));
		list.add(new DummyConfigElement.DummyCategoryElement(I18n.format("eirairc:config.category.settings"), "eirairc:config.category.settings", new ConfigElement(SharedGlobalConfig.thisConfig.getCategory(SharedGlobalConfig.SETTINGS)).getChildElements()));
		return list;
	}


}

@@ -1509,257 +1509,8 @@
 ));%0A
-%09%09list.add(new DummyConfigElement.DummyCategoryElement(I18n.format(%22eirairc:config.category.network%22), %22eirairc:config.category.network%22, new ConfigElement(SharedGlobalConfig.thisConfig.getCategory(SharedGlobalConfig.NETWORK)).getChildElements()));%0A
 %09%09li
@@ -2125,29 +2125,262 @@
 ategory.
-compatibility
+theme%22), %22eirairc:config.category.theme%22, new ConfigElement(SharedGlobalConfig.thisConfig.getCategory(SharedGlobalConfig.THEME)).getChildElements()));%0A%09%09list.add(new DummyConfigElement.DummyCategoryElement(I18n.format(%22eirairc:config.category.bot
 %22), %22eir
@@ -2404,21 +2404,11 @@
 ory.
-compatibility
+bot
 %22, n
@@ -2416,38 +2416,38 @@
 w ConfigElement(
-Client
+Shared
 GlobalConfig.thi
@@ -2458,38 +2458,38 @@
 fig.getCategory(
-Client
+Shared
 GlobalConfig.COM
@@ -2489,21 +2489,11 @@
 fig.
-COMPATIBILITY
+BOT
 )).g
@@ -2597,37 +2597,40 @@
 config.category.
-theme
+settings
 %22), %22eirairc:con
@@ -2634,37 +2634,40 @@
 config.category.
-theme
+settings
 %22, new ConfigEle
@@ -2724,37 +2724,40 @@
 redGlobalConfig.
-THEME
+SETTINGS
 )).getChildEleme
@@ -2849,35 +2849,45 @@
 config.category.
-bot
+compatibility
 %22), %22eirairc:con
@@ -2891,35 +2891,45 @@
 config.category.
-bot
+compatibility
 %22, new ConfigEle
@@ -2925,38 +2925,38 @@
 w ConfigElement(
-Shared
+Client
 GlobalConfig.thi
@@ -2967,38 +2967,38 @@
 fig.getCategory(
-Shared
+Client
 GlobalConfig.BOT
@@ -2986,35 +2986,45 @@
 entGlobalConfig.
-BOT
+COMPATIBILITY
 )).getChildEleme
@@ -3120,32 +3120,31 @@
 ig.category.
-settings
+network
 %22), %22eirairc
@@ -3156,32 +3156,31 @@
 ig.category.
-settings
+network
 %22, new Confi
@@ -3245,32 +3245,31 @@
 lobalConfig.
-SETTINGS
+NETWORK
 )).getChildE

Reorder config GUI.