/*
 * Copyright 2023 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
 */

#include <keel/module.hpp>

#include <jasper/world/worldobject.hpp>
#include <jasper/world/worldstatic.hpp>

#include "typeconv.hpp"

namespace jasper::world {

static class: public keel::Module {

	[[nodiscard]]
	ox::String id() const noexcept override {
		return ox::String("net.drinkingtea.jasper.world");
	}

	[[nodiscard]]
	ox::Vector<keel::TypeDescGenerator> types() const noexcept override {
		return {
			keel::generateTypeDesc<WorldObjectSet>,
			keel::generateTypeDesc<WorldDoc>,
			keel::generateTypeDesc<WorldStatic>,
		};
	}

	[[nodiscard]]
	ox::Vector<keel::Converter> converters() const noexcept final {
		return {
			keel::Converter::make<convertWorldDocToWorldStatic>(),
		};
	}

	[[nodiscard]]
	ox::Vector<keel::PackTransform> packTransforms() const noexcept override {
		return {
			keel::transformRule<WorldDoc, WorldStatic>,
		};
	}

} mod;

keel::Module const*keelModule() noexcept {
	return &mod;
}

}
