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.normal:
        return ThemeConfig.rarityNormal;
      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 String getIconPath(EquipmentSlot slot) {
    switch (slot) {
      case EquipmentSlot.weapon:
        return 'assets/data/icon/icon_weapon.png';
      case EquipmentSlot.shield:
        return 'assets/data/icon/icon_shield.png';
      case EquipmentSlot.armor:
        return 'assets/data/icon/icon_armor.png';
      case EquipmentSlot.accessory:
        return 'assets/data/icon/icon_accessory.png';
    }
  }
}
