import { GameConfig, ScoringCategory } from "../../types";

const BASE_CATEGORIES: ScoringCategory[] = [
  { id: "arbres", label: "Arbres", icon: "TreePine", color: "#16a34a" },
  { id: "montagnes", label: "Montagnes", icon: "Mountain", color: "#64748b" },
  { id: "champs", label: "Champs", icon: "Wheat", color: "#d97706" },
  { id: "batiments", label: "Bâtiments", icon: "Building2", color: "#dc2626" },
  { id: "eau", label: "Rivière", icon: "Waves", color: "#0ea5e9" },
  { id: "animaux", label: "Animaux", icon: "Rabbit", color: "#a16207" },
];

const NATURE_SPIRIT_CATEGORY: ScoringCategory = {
  id: "esprits_nature",
  label: "Esprits de la nature",
  icon: "Sparkles",
  color: "#8b5cf6",
};

export const harmonieConfig: GameConfig = {
  imagePath: "/games-assets/harmonies-logo.webp",
  bannerPath: "/games-assets/harmonies-banner.webp",
  rulesUrl: "/games-assets/harmonies-rules.pdf",
  id: "harmonie",
  name: "Harmonies",
  minPlayers: 1,
  maxPlayers: 4,
  scoreType: "positive",
  fixedRounds: 1,
  description: "Créez des paysages pour accueillir des animaux.",
  icon: "TreePine",
  colors: {
    primary: "#065f46", // Vert émeraude sombre tiré de la boite Harmonies
  },
  options: [
    {
      id: "esprits_nature",
      label: "Extension : Esprits de la nature",
      type: "boolean",
      defaultValue: false,
    },
  ],
  scoringCategories: BASE_CATEGORIES,
  // When the "Esprits de la nature" rule is on, add a final scoring category.
  getScoringCategories: (options) =>
    options?.esprits_nature
      ? [...BASE_CATEGORIES, NATURE_SPIRIT_CATEGORY]
      : BASE_CATEGORIES,
};
