package net.mcreator.customoregen.config;

import net.neoforged.fml.ModList;

public class ConfigHelper {
	// Helper method to safely access config values
	public static boolean isFeatureEnabled(String featureName) {
		switch (featureName) {
			case "shardDiamondTools":
				return ModConfigs.FEATURES.enableShardDiamondTools.get();
			case "shardDiamondOre":
				return ModConfigs.FEATURES.enableShardDiamondOre.get();
			case "concentratedOres":
				return ModConfigs.FEATURES.enableConcentratedOres.get();
			case "impureOres":
				return ModConfigs.FEATURES.enableImpureOres.get();
			case "pureGoldenOre":
				return ModConfigs.FEATURES.enablePureGoldenOre.get();
			case "customEmeraldOres":
				return ModConfigs.FEATURES.enableCustomEmeraldOres.get();
			case "customCopperOres":
				return ModConfigs.FEATURES.enableCustomCopperOres.get();
			case "vanillaOreVariants":
				return ModConfigs.FEATURES.enableVanillaOreVariants.get();
			default:
				return true;
		}
	}

	public static int getShardDiamondToolDurability(String toolType) {
		switch (toolType) {
			case "pickaxe":
				return ModConfigs.TOOL_STATS.shardDiamondPickaxeDurability.get();
			case "axe":
				return ModConfigs.TOOL_STATS.shardDiamondAxeDurability.get();
			case "shovel":
				return ModConfigs.TOOL_STATS.shardDiamondShovelDurability.get();
			default:
				return 200;
		}
	}

	public static float getShardDiamondToolSpeed(String toolType) {
		switch (toolType) {
			case "pickaxe":
				return ModConfigs.TOOL_STATS.shardDiamondPickaxeSpeed.get().floatValue();
			case "axe":
				return ModConfigs.TOOL_STATS.shardDiamondAxeSpeed.get().floatValue();
			case "shovel":
				return ModConfigs.TOOL_STATS.shardDiamondShovelSpeed.get().floatValue();
			default:
				return 7.0f;
		}
	}

	public static int getShardDiamondToolDamage(String toolType) {
		switch (toolType) {
			case "pickaxe":
				return ModConfigs.TOOL_STATS.shardDiamondPickaxeAttackDamage.get();
			case "axe":
				return ModConfigs.TOOL_STATS.shardDiamondAxeAttackDamage.get();
			case "shovel":
				return ModConfigs.TOOL_STATS.shardDiamondShovelAttackDamage.get();
			default:
				return 1;
		}
	}
}
