#include "AnimationTreeTemplate.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/AnimationTreeTemplateEditor.hpp"

REGISTER_COMPONENT_GROUP("Animation Tree Template", "Animation",
				 AnimationTreeTemplate, AnimationTreeTemplateEditor)
{
	registry.registerComponent<AnimationTreeTemplate>(
		AnimationTreeTemplate_name, AnimationTreeTemplate_group,
		std::make_unique<AnimationTreeTemplateEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<AnimationTreeTemplate>()) {
				e.set<AnimationTreeTemplate>({});
			}
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<AnimationTreeTemplate>()) {
				e.remove<AnimationTreeTemplate>();
			}
		});
}
