#pragma once

#include <lucy/renderer/sprite_sheet.h>

namespace Lucy
{
  class Tilemap
  {
    using TilemapRow_t = std::vector<int32_t>;
    using Tilemap_t = std::vector<TilemapRow_t>;

    public:
      Tilemap() {}
      Tilemap(const std::string_view filePath);

      void render(const glm::vec3& mapStartPosition, const float tilePadding = 0.f) const;

      //Getter
      const Tilemap_t& tilemap() const;
      SpriteSheet tileset() const;
      float width() const;
      float height() const;

    private:
      //width and height in tiles
      float width_ = 0.f;
      float height_ = 0.f;

      Tilemap_t tilemap_;
      SpriteSheet tileset_;
  };
}