import 'package:flutter/material.dart';
import '../game/enums.dart';
import '../game/config/theme_config.dart';

class ItemUtils {
  static Color getRarityColor(ItemRarity rarity) {
    switch (rarity) {
      case ItemRarity.magic:
        return ThemeConfig.rarityMagic;
      case ItemRarity.rare:
        return ThemeConfig.rarityRare;
      case ItemRarity.legendary:
        return ThemeConfig.rarityLegendary;
      case ItemRarity.unique:
        return ThemeConfig.rarityUnique;
    }
  }

  static IconData getIcon(EquipmentSlot slot) {
    switch (slot) {
      case EquipmentSlot.weapon:
        return Icons.change_history; // Triangle
      case EquipmentSlot.shield:
        return Icons.shield;
      case EquipmentSlot.armor:
        return Icons.checkroom;
      case EquipmentSlot.accessory:
        return Icons.diamond;
    }
  }

  static Color getColor(EquipmentSlot slot) {
    switch (slot) {
      case EquipmentSlot.weapon:
        return Colors.red;
      case EquipmentSlot.shield:
        return Colors.blue;
      case EquipmentSlot.armor:
        return Colors.blue;
      case EquipmentSlot.accessory:
        return Colors.orange;
    }
  }
}
