#pragma once
#include "DeerRender/Render/Shader.h"
#include "Deer/Path.h"

#include <cstdint>

#define SCENE_MAX_SHADER_COUNT 1024

namespace Deer {
	struct ShaderData {
        std::string vertexShader;
        std::string fragmentShader;

		ShaderData() = default;
		~ShaderData() = default;

		ShaderData(const ShaderData&) = delete;
		ShaderData& operator=(const ShaderData&) = delete;

		void freeData() {
            vertexShader.clear();
            fragmentShader.clear();
		}
	};

	namespace ShaderManager {
		uint16_t loadShader(const Path& name);
		uint16_t loadShader(const ShaderData&, const Path& name);
		Shader& getShader(uint16_t);
		const Path& getShaderName(uint16_t);

		void unloadAllShaders();
	}

	namespace DataStore {
		void loadShader(ShaderData& data, const Path& name);
	}  // namespace DataStore
}  // namespace Deer