// ===========================================================================
// FILE: lib/core/app_colors.dart
// ===========================================================================

import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

enum AppThemeType { doodle, cyberpunk, arcade, grimorio, music }

class ThemeColors {
  final Color background;
  final Color gridLine;
  final Color playerRed;
  final Color playerBlue;
  final Color text;

  const ThemeColors({
    required this.background,
    required this.gridLine,
    required this.playerRed,
    required this.playerBlue,
    required this.text,
  });
}

class AppColors {
  static const ThemeColors doodle = ThemeColors(
    background: Color(0xFFFFF9E6), gridLine: Color(0xFFB0BEC5),
    playerRed: Color(0xFFD32F2F), playerBlue: Color(0xFF1565C0), text: Color(0xFF37474F),
  );

  static const ThemeColors cyberpunk = ThemeColors(
    background: Color(0xFF0A001A), gridLine: Color(0xFF6200EA),
    playerRed: Color(0xFFFF007F), playerBlue: Color(0xFF69F0AE), text: Color(0xFFFFFFFF),
  );

  static const ThemeColors arcade = ThemeColors(
    background: Color(0xFF111111), gridLine: Color(0xFF00FF00),
    playerRed: Color(0xFFFF004D), playerBlue: Color(0xFF00E5FF), text: Color(0xFFFFFFFF),
  );

  static const ThemeColors grimorio = ThemeColors(
    background: Color(0xFF1E112A), gridLine: Colors.black,
    playerRed: Color(0xFFE91E63), playerBlue: Color(0xFF4FC3F7), text: Color(0xFFFFF3E0),
  );

  static const ThemeColors music = ThemeColors(
    background: Color(0xFF120B29),
    gridLine: Color(0xFF6A1B9A),
    playerRed: Color(0xFFFF2A6D),
    playerBlue: Color(0xFF05D5FF),
    text: Color(0xFFE0E0E0),
  );

  static ThemeColors getTheme(AppThemeType type) {
    switch (type) {
      case AppThemeType.doodle: return doodle;
      case AppThemeType.cyberpunk: return cyberpunk;
      case AppThemeType.arcade: return arcade;
      case AppThemeType.grimorio: return grimorio;
      case AppThemeType.music: return music;
    }
  }
}

class ThemeIcons {
  static IconData gold(AppThemeType type) {
    switch (type) {
      case AppThemeType.doodle: return FontAwesomeIcons.star;
      case AppThemeType.cyberpunk: return FontAwesomeIcons.microchip;
      case AppThemeType.arcade: return FontAwesomeIcons.coins;
      case AppThemeType.grimorio: return FontAwesomeIcons.crown;
      case AppThemeType.music: return FontAwesomeIcons.compactDisc;
    }
  }

  static IconData bomb(AppThemeType type) {
    switch (type) {
      case AppThemeType.doodle: return FontAwesomeIcons.virus;
      case AppThemeType.cyberpunk: return FontAwesomeIcons.bug;
      case AppThemeType.arcade: return FontAwesomeIcons.ghost;
      case AppThemeType.grimorio: return FontAwesomeIcons.hatWizard;
      case AppThemeType.music: return FontAwesomeIcons.volumeXmark;
    }
  }

  static IconData swap(AppThemeType type) {
    switch (type) {
      case AppThemeType.doodle: return FontAwesomeIcons.arrowsRotate;
      case AppThemeType.cyberpunk: return FontAwesomeIcons.networkWired;
      case AppThemeType.arcade: return FontAwesomeIcons.shuffle;
      case AppThemeType.grimorio: return FontAwesomeIcons.hurricane;
      case AppThemeType.music: return FontAwesomeIcons.sliders;
    }
  }

  static IconData joker(AppThemeType type) {
    switch (type) {
      case AppThemeType.doodle: return FontAwesomeIcons.faceSmileBeam;
      case AppThemeType.cyberpunk: return FontAwesomeIcons.robot;
      case AppThemeType.arcade: return FontAwesomeIcons.gamepad;
      case AppThemeType.grimorio: return FontAwesomeIcons.masksTheater;
      case AppThemeType.music: return FontAwesomeIcons.headphones;
    }
  }

  static IconData block(AppThemeType type) {
    switch (type) {
      case AppThemeType.doodle: return FontAwesomeIcons.squareXmark;
      case AppThemeType.cyberpunk: return FontAwesomeIcons.shieldHalved;
      case AppThemeType.arcade: return FontAwesomeIcons.powerOff;
      case AppThemeType.grimorio: return FontAwesomeIcons.meteor;
      case AppThemeType.music: return FontAwesomeIcons.pause;
    }
  }

  static IconData ice(AppThemeType type) {
    if (type == AppThemeType.music) return FontAwesomeIcons.music;
    return FontAwesomeIcons.snowflake;
  }

  static IconData multiplier(AppThemeType type) {
    if (type == AppThemeType.music) return FontAwesomeIcons.forwardFast;
    return FontAwesomeIcons.bolt;
  }
}