#pragma once
#include "DeerRender/Mesh.h"
#include "DeerRender/Shader.h"
#include "DeerRender/Texture.h"
#include "DeerStudio/EditorDataImporter.h"
#include "DeerStudio/ResourceDataSource.h"
#include "scriptarray.h"
#include "scriptdictionary.h"

#include <stdint.h>
#include <string>

namespace Deer {
	namespace StudioAPI {
		template <typename T>
		class APIResource : public Resource<T> {
		  public:
			std::string getPath() const { return ResourceManager<T>::getStorageId(*this); }
			std::string getName() const { return Path(ResourceManager<T>::getStorageId(*this)).stem().string(); }
		};

		enum ResourceType : uint32_t {
			NONE = 0,
			MESH = 1,
			SHADER = 2,
			TEXTURE = 3,
		};

		CScriptArray* getResourceFolders(std::string& path);
		CScriptArray* getResourceFiles(std::string& path);

		CScriptDictionary* getResourceMetadata(std::string& resource);
		CScriptDictionary* setResourceMetadata(std::string& resource);

		ResourceType getResourceType(std::string&);
	} // namespace StudioAPI
} // namespace Deer