#include "Sun.hpp"
#include "Transform.hpp"
#include "EditorMarker.hpp"
#include "EntityName.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/SunEditor.hpp"

REGISTER_COMPONENT_GROUP("Sun", "Environment", SunComponent, SunEditor)
{
	registry.registerComponent<SunComponent>(
		"Sun", "Environment", std::make_unique<SunEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<SunComponent>()) {
				e.set<SunComponent>({});
			}
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<SunComponent>()) {
				e.remove<SunComponent>();
			}
		});
}
