#ifndef CABSTRACTSCRIPT_HPP
#define CABSTRACTSCRIPT_HPP

#include "../CAbstractComponent.hpp"
#include "../../Entity/CEntity.hpp"
#include <memory>
//#include "../../../Modules/CPlugin.hpp"
//#include "../../../Controller/CKernel.fwd.hpp"
namespace CosmicCore {
	//TODO
	class CAbstractScript : public CAbstractComponent
	{
	private:
			std::string m_scriptName;
			//CKernel* m_kernelPTR;
	public:
		//static CPlugin<CAbstractScript>* m_scriptPLugin;
		CAbstractScript(CEntity& entity);
		virtual void start() = 0;
		virtual void update() = 0;
		nlohmann::json to_json();
		static CAbstractScript* from_json(CEntity& entity, nlohmann::json& j);
		virtual ~CAbstractScript(){};
		std::string getName() { return m_scriptName; };
		//CKernel* getKernel() { return m_kernelPTR; };
		//void setKernel(CKernel* kernel) { m_kernelPTR = kernel; };
		void setName(std::string name) { m_scriptName = name; };
	};
}



#endif