#pragma once
#include <stdint.h>

class asITypeInfo;
class asIScriptObject;
class asIScriptFunction;
class asIScriptContext;
class asIScriptGeneric;
class asIScriptModule;

namespace Deer {
	namespace EditorEngine {
		struct ServiceScriptObject {
		  public:
			ServiceScriptObject(asITypeInfo *, asIScriptContext *);
			~ServiceScriptObject();
			// Delete copy constructor
			ServiceScriptObject(const ServiceScriptObject &) = delete;
			ServiceScriptObject &
			operator=(const ServiceScriptObject &) = delete;

			ServiceScriptObject(ServiceScriptObject &&other) noexcept;
			ServiceScriptObject &
			operator=(ServiceScriptObject &&other) noexcept;

			void init();
			void update();

			void bindFunctions();

			const char *getName();

		  private:
			asITypeInfo *type = nullptr;
			asIScriptObject *object = nullptr;
			asIScriptFunction *updateFunction = nullptr;
			asIScriptFunction *initFunction = nullptr;
			asIScriptContext *scriptContext = nullptr;
		};
	} // namespace EditorEngine
} // namespace Deer