/**
 * @fileoverview Utility module for constants.js
 * @module games.quebracabecas.ui.constants
 */

// import assets so that Vite will copy and return correct URLs
import bg1 from "../assets/backgrounds/background_1.png";
import bg2 from "../assets/backgrounds/background_2.png";
import bg3 from "../assets/backgrounds/background_3.png";
import bg4 from "../assets/backgrounds/background_4.png";

import animalAbelha from "../assets/animais/abelha.png";
import animalAranha from "../assets/animais/aranha.png";
import animalCachorro from "../assets/animais/cachorro.png";
import animalCaracol from "../assets/animais/caracol.png";
import animalCobra from "../assets/animais/cobra.png";
import animalGato from "../assets/animais/gato.png";
import animalLeao from "../assets/animais/leao.png";
import animalPato from "../assets/animais/pato.png";
import animalPeixe from "../assets/animais/peixe.png";
import animalSapo from "../assets/animais/sapo.png";

import soundBg from "../assets/sound/bg_sound.mp3";
import soundAbelha from "../assets/sound/abelha.mp3";
import soundCachorro from "../assets/sound/cachorro.mp3";
import soundGato from "../assets/sound/gato.mp3";
import soundPato from "../assets/sound/pato.mp3";
import soundLeao from "../assets/sound/leao.mp3";
import soundSapo from "../assets/sound/sapo.mp3";

export const ConstantesJogo = {
  LARGURA_TELA: 800,
  ALTURA_TELA: 600,
  COR_FUNDO: "#242527",
};

// Mapeamento direto da árvore de arquivos para o preload
export const ConstantesAssets = {
  CHAVES: {
    BACKGROUND_1: "bg_1",
    BACKGROUND_2: "bg_2",
    BACKGROUND_3: "bg_3",
    BACKGROUND_4: "bg_4",
    ABELHA: "animal_abelha",
    ARANHA: "animal_aranha",
    CACHORRO: "animal_cachorro",
    CARACOL: "animal_caracol",
    COBRA: "animal_cobra",
    GATO: "animal_gato",
    LEAO: "animal_leao",
    PATO: "animal_pato",
    PEIXE: "animal_peixe",
    SAPO: "animal_sapo",
  },
  PATHS: {
    BACKGROUND_1: bg1,
    BACKGROUND_2: bg2,
    BACKGROUND_3: bg3,
    BACKGROUND_4: bg4,
    ABELHA: animalAbelha,
    ARANHA: animalAranha,
    CACHORRO: animalCachorro,
    CARACOL: animalCaracol,
    COBRA: animalCobra,
    GATO: animalGato,
    LEAO: animalLeao,
    PATO: animalPato,
    PEIXE: animalPeixe,
    SAPO: animalSapo,
  }
};

// Sons do jogo
export const ConstantesSons = {
  // Chaves Phaser (usadas em load.audio e play)
  CHAVES: {
    BG:     "puzzle_bg",
    ABELHA: "puzzle_abelha",
    CACHORRO: "puzzle_cachorro",
    GATO:   "puzzle_gato",
    PATO:  "puzzle_pato",
    LEAO: "puzzle_leao",
    SAPO: "puzzle_sapo",
  },
  // URLs processadas pelo Vite
  PATHS: {
    BG: soundBg,
    ABELHA: soundAbelha,
    CACHORRO: soundCachorro,
    GATO:   soundGato,
    PATO:  soundPato,
    LEAO: soundLeao,
    SAPO: soundSapo,
  },
  // Mapeamento valor do bloco → chave Phaser
  // As chaves devem corresponder aos valores do dropdown do bloco animal_som
  BLOCO_PARA_CHAVE: {
    Zumbido: "puzzle_abelha",
    Miau:    "puzzle_gato",
    Auau:    "puzzle_cachorro",
    Quack:   "puzzle_pato",
    Rugido:  "puzzle_leao",
    Coaxado: "puzzle_sapo",
  },
};