#pragma once

namespace map_rotation
{
	struct map_rotation_parse_error : public std::exception
	{
		[[nodiscard]] const char* what() const noexcept override { return "Map Rotation Parse Error"; }
	};

	class rotation_data
	{
	public:
		using rotation_entry = std::pair<std::string, std::string>;

		rotation_data();

		void randomize();

		void add_entry(const std::string& key, const std::string& value);

		[[nodiscard]] bool contains(const std::string& key, const std::string& value) const;
		[[nodiscard]] bool empty() const noexcept;
		[[nodiscard]] std::size_t get_entries_size() const noexcept;
		[[nodiscard]] rotation_entry& get_next_entry();

		void parse(const std::string& data);

	private:
		std::vector<rotation_entry> rotation_entries_;
		std::size_t index_;
	};
}
