import "reflect-metadata";
import { MODULE_METADATA_KEY } from "../constants";
import type { ModuleOptions } from "../interfaces/provider.interface";

/**
 * Decorator that marks a class as an Alveo module.
 * Modules are used to organize the application structure and define providers, imports, and exports.
 *
 * @param options Module configuration options
 */
export function Module(options: ModuleOptions): ClassDecorator {
	return (target: object) => {
		Reflect.defineMetadata(MODULE_METADATA_KEY, options, target);
	};
}
