#ifndef __TILES__TILE_MAP_MANAGER_H__
#define __TILES__TILE_MAP_MANAGER_H__

#include "TileMap.h"
#include <unordered_map>
#include <string>
#include <vector>

class TileMapManager
{
public:
    TileMapManager();

    // Create new fixed-size map
    void CreateMap(const std::string& name, int widthInChunks, int heightInChunks);
    
    // Get map by name
    TileMap* GetMap(const std::string& name);
    const TileMap* GetMap(const std::string& name) const;
    
    // Get currently active map
    TileMap* GetCurrentMap();
    const TileMap* GetCurrentMap() const;
    
    // Switch to another map on the fly    
    bool SetCurrentMap(const std::string& name);
    
    // Utilities
    std::vector<std::string> GetAllMapNames() const;
    bool HasMap(const std::string& name) const;
    void PrintAllMaps() const;
    
    // Python friendly later
    std::vector<std::string> GetMapNames() const;

private:
    std::unordered_map<std::string, TileMap> maps;
    std::string currentMapName;

};

#endif