/**************************************************************************/
/*  register_types.cpp                                                    */
/**************************************************************************/
/*                         This file is part of:                          */
/*                          AETHEX ENGINE                                 */
/*                     https://aethex.foundation                          */
/**************************************************************************/
/* Copyright (c) 2026-present AeThex Labs.                                */
/**************************************************************************/

#include "register_types.h"

#include "core/object/class_db.h"
#include "export_config.h"
#include "export_preset.h"
#include "platform_exporter.h"
#include "roblox_exporter.h"
#include "uefn_exporter.h"
#include "unity_exporter.h"
#include "web_exporter.h"

#ifdef TOOLS_ENABLED
#include "editor/export_dialog.h"
#include "editor/platform_settings.h"
#include "editor/plugins/editor_plugin.h"
#endif

void initialize_aethex_export_module(ModuleInitializationLevel p_level) {
	if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
		GDREGISTER_CLASS(AeThexExportConfig);
		GDREGISTER_CLASS(AeThexExportPreset);
		GDREGISTER_ABSTRACT_CLASS(AeThexPlatformExporter);
		GDREGISTER_CLASS(AeThexRobloxExporter);
		GDREGISTER_CLASS(AeThexUEFNExporter);
		GDREGISTER_CLASS(AeThexUnityExporter);
		GDREGISTER_CLASS(AeThexWebExporter);
	}
	
#ifdef TOOLS_ENABLED
	if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
		GDREGISTER_CLASS(AeThexExportDialog);
		GDREGISTER_CLASS(AeThexPlatformSettings);
		EditorPlugins::add_by_type<AeThexExportPlugin>();
	}
#endif
}

void uninitialize_aethex_export_module(ModuleInitializationLevel p_level) {
#ifdef TOOLS_ENABLED
	if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
		// Cleanup
	}
#endif
}
