package se.mickelus.tetra.items.modular;

import javax.annotation.ParametersAreNonnullByDefault;
import java.util.HashMap;
import java.util.Map;

@ParametersAreNonnullByDefault
public class ItemColors {
    private static final Map<String, Integer> colors = new HashMap<>();

    public static int oak = define(0xbf934b, "oak");
    public static int oak_glyph = define(0x9d804e, "oak_glyph");
    public static int spruce = define(0x694f2f, "spruce");
    public static int spruce_glyph = define(0x694f2f, "spruce_glyph");
    public static int birch = define(0xf5dd8c, "birch");
    public static int birch_glyph = define(0xc8b77d, "birch_glyph");
    public static int jungle = define(0xb07b58, "jungle");
    public static int jungle_glyph = define(0x996e4c, "jungle_glyph");
    public static int acacia = define(0xac5d33, "acacia");
    public static int acacia_glyph = define(0xac5d33, "acacia_glyph");
    public static int dark_oak = define(0x3c2712, "dark_oak");
    public static int dark_oak_glyph = define(0x3c2712, "dark_oak_glyph");
    public static int crimson = define(0x863e5a, "crimson");
    public static int crimson_glyph = define(0x6a344b, "crimson_glyph");
    public static int warped = define(0x398382, "warped");
    public static int warped_glyph = define(0x287067, "warped_glyph");
    public static int cobblestone = define(0xffffff, "cobblestone");
    public static int cobblestone_glyph = define(0x9a9a9a, "cobblestone_glyph");
    public static int stone = define(0xffffff, "stone");
    public static int stone_glyph = define(0x9a9a9a, "stone_glyph");
    public static int granite = define(0xd38b70, "granite");
    public static int granite_glyph = define(0x8a6658, "granite_glyph");
    public static int diorite = define(0xffffff, "diorite");
    public static int diorite_glyph = define(0xa1a1a3, "diorite_glyph");
    public static int andesite = define(0xaabbcc, "andesite");
    public static int andesite_glyph = define(0x79797a, "andesite_glyph");
    public static int blackstone = define(0x626262, "blackstone");
    public static int blackstone_glyph = define(0x303030, "blackstone_glyph");
    public static int obsidian = define(0x44395e, "obsidian");
    public static int obsidian_glyph = define(0x3c3056, "obsidian_glyph");
    public static int flint = define(0x676767, "flint");
    public static int flint_glyph = define(0x343434, "flint_glyph");
    public static int iron = define(0xffffff, "iron");
    public static int iron_dark = define(0xaaaaaa, "iron_dark");
    public static int iron_glyph = define(0xd8d8d8, "iron_glyph");
    public static int netherite = define(0x694f52, "netherite");
    public static int netherite_glyph = define(0x806164, "netherite_glyph");
    public static int gold = define(0xfffb46, "gold");
    public static int gold_glyph = define(0xeaee57, "gold_glyph");
    public static int diamond = define(0x2bffee, "diamond");
    public static int diamond_glyph = define(0x33ebcb, "diamond_glyph");
    public static int lapis = define(0x1b4aa1, "lapis");
    public static int lapis_glyph = define(0x1b4aa1, "lapis_glyph");
    public static int emerald = define(0x009e30, "emerald");
    public static int emerald_glyph = define(0x09b537, "emerald_glyph");
    public static int copper = define(0xdf7646, "copper");
    public static int copper_glyph = define(0xdf7646, "copper_glyph");
    public static int tin = define(0xb3c9c1, "tin");
    public static int tin_glyph = define(0xb3c9c1, "tin_glyph");
    public static int silver = define(0xccc2ff, "silver");
    public static int silver_glyph = define(0xd6f6ff, "silver_glyph");
    public static int nickel = define(0xc2d3a6, "nickel");
    public static int nickel_glyph = define(0xc2d3a6, "nickel_glyph");
    public static int lead = define(0x9781b3, "lead");
    public static int lead_glyph = define(0x897a9b, "lead_glyph");
    public static int bronze = define(0xb36827, "bronze");
    public static int bronze_glyph = define(0xb2712c, "bronze_glyph");
    public static int electrum = define(0xe4da4c, "electrum");
    public static int electrum_glyph = define(0xe4da4c, "electrum_glyph");
    public static int steel = define(0x999999, "steel");
    public static int steel_glyph = define(0x999999, "steel_glyph");
    public static int prismarine = define(0x8cffdb, "prismarine");
    public static int prismarine_dark = define(0x498a76, "prismarine_dark");
    public static int prismarine_glyph = define(0x73b5aa, "prismarine_glyph");
    public static int stick = define(0x866526, "stick");
    public static int stick_glyph = define(0x866526, "stick_glyph");
    public static int maple = define(0x623913, "maple");
    public static int maple_glyph = define(0x623913, "maple_glyph");
    public static int cherry = define(0x684817, "cherry");
    public static int cherry_glyph = define(0x684817, "cherry_glyph");
    public static int baobab = define(0x444b2c, "baobab");
    public static int baobab_glyph = define(0x444b2c, "baobab_glyph");
    public static int bone = define(0xf7f5c6, "bone");
    public static int bone_glyph = define(0xedebca, "bone_glyph");
    public static int blaze_rod = define(0xffc300, "blaze_rod");
    public static int blaze_rod_glyph = define(0xffc100, "blaze_rod_glyph");
    public static int end_rod = define(0xd6c1cf, "end_rod");
    public static int end_rod_glyph = define(0xbd9ab1, "end_rod_glyph");
    public static int greatwood = define(0x33231e, "greatwood");
    public static int greatwood_glyph = define(0x33231e, "greatwood_glyph");
    public static int treated_wood = define(0x422114, "treated_wood");
    public static int treated_wood_glyph = define(0x422114, "treated_wood_glyph");
    public static int forged_beam = define(0x383838, "forged_beam");
    public static int forged_beam_glyph = define(0x383838, "forged_beam_glyph");
    public static int string = define(0xcccccc, "string");
    public static int string_glyph = define(0xffffff, "string_glyph");
    public static int wool = define(0xcccccc, "wool");
    public static int wool_glyph = define(0xffffff, "wool_glyph");
    public static int leather = define(0xb35e30, "leather");
    public static int leather_glyph = define(0x866526, "leather_glyph");
    public static int hide = define(0x996d3d, "hide");
    public static int hide_glyph = define(0xa88054, "hide_glyph");
    public static int turtle = define(0x445c24, "turtle");
    public static int turtle_glyph = define(0x445d24, "turtle_glyph");
    public static int shulker = define(0x956895, "shulker");
    public static int shulker_glyph = define(0x956895, "shulker_glyph");
    public static int phantom = define(0xdbc4bd, "phantom");
    public static int phantom_glyph = define(0xc2b29b, "phantom_glyph");
    public static int dragon = define(0x44395e, "dragon");
    public static int dragon_glyph = define(0x3c3056, "dragon_glyph");
    public static int vine = define(0x445c24, "vine");
    public static int vine_glyph = define(0x445d24, "vine_glyph");
    public static int weeping = define(0x991f1f, "weeping");
    public static int weeping_glyph = define(0x991f1f, "weeping_glyph");
    public static int bolt = define(0xffffff, "bolt");
    public static int bolt_glyph = define(0x383838, "bolt_glyph");
    public static int vent = define(0xffffff, "vent");
    public static int vent_glyph = define(0x5f524b, "vent_glyph");

    // todo: remove
    public static int thaumium = define(0x4d3984, "thaumium");
    public static int thaumium_glyph = define(0x4d3984, "thaumium_glyph");
    public static int ironwood = define(0x625c58, "ironwood");
    public static int ironwood_glyph = define(0x5ea917, "ironwood_glyph");
    public static int steeleaf = define(0x458430, "steeleaf");
    public static int steeleaf_glyph = define(0x458430, "steeleaf_glyph");
    public static int fierymetal = define(0xfa9f00, "fierymetal");
    public static int fierymetal_glyph = define(0xfa9f00, "fierymetal_glyph");
    public static int knightmetal = define(0xb8cf9c, "knightmetal");
    public static int knightmetal_glyph = define(0xb8cf9c, "knightmetal_glyph");

    public static int inherit = define(0x000000, "inherit");

    public static int define(int value, String color) {
        colors.put(color, value);
        return value;
    }

    public static int get(String color) {
        return colors.get(color);
    }

    public static boolean exists(String color) {
        return colors.containsKey(color);
    }
}
