#pragma once

#include <SDL3/SDL.h>

#include <cstdint>
#include <string>
#include <unordered_map>

// --- Enums ---
enum class InputAction : std::uint8_t {  // Acciones de entrada posibles en el juego
    // Inputs de movimiento
    LEFT,
    RIGHT,
    JUMP,
    DOWN,

    // Inputs de control
    PAUSE,
    EXIT,
    ACCEPT,
    CANCEL,

    // Inputs de sistema
    WINDOW_INC_ZOOM,
    WINDOW_DEC_ZOOM,
    TOGGLE_FULLSCREEN,
    TOGGLE_VSYNC,
    TOGGLE_INTEGER_SCALE,
    TOGGLE_SHADER,
    NEXT_SHADER_PRESET,
    TOGGLE_SUPERSAMPLING,
    TOGGLE_BORDER,
    TOGGLE_IN_GAME_MUSIC,
    NEXT_PALETTE,
    PREVIOUS_PALETTE,
    NEXT_PALETTE_SORT,
    TOGGLE_INFO,
    TOGGLE_CONSOLE,
    SCREENSHOT,

    // Input obligatorio
    NONE,
    SIZE,
};

// --- Variables ---
extern const std::unordered_map<InputAction, std::string> ACTION_TO_STRING;        // Mapeo de acción a string
extern const std::unordered_map<std::string, InputAction> STRING_TO_ACTION;        // Mapeo de string a acción
extern const std::unordered_map<SDL_GamepadButton, std::string> BUTTON_TO_STRING;  // Mapeo de botón a string
extern const std::unordered_map<std::string, SDL_GamepadButton> STRING_TO_BUTTON;  // Mapeo de string a botón