#include "SmartObject.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/SmartObjectEditor.hpp"

REGISTER_COMPONENT_GROUP("Smart Object", "AI", SmartObjectComponent,
			 SmartObjectEditor)
{
	registry.registerComponent<SmartObjectComponent>(
		"Smart Object", "AI", std::make_unique<SmartObjectEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<SmartObjectComponent>())
				e.set<SmartObjectComponent>({});
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<SmartObjectComponent>())
				e.remove<SmartObjectComponent>();
		});
}
