#include "GoapRunner.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/GoapRunnerEditor.hpp"

REGISTER_COMPONENT_GROUP("GOAP Runner", "AI", GoapRunnerComponent,
			 GoapRunnerEditor)
{
	registry.registerComponent<GoapRunnerComponent>(
		"GOAP Runner", "AI",
		std::make_unique<GoapRunnerEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<GoapRunnerComponent>())
				e.set<GoapRunnerComponent>({});
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<GoapRunnerComponent>())
				e.remove<GoapRunnerComponent>();
		});
}
