"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Environment = void 0;
exports.DisallowInProduction = DisallowInProduction;
var Environment;
(function (Environment) {
    Environment["Production"] = "prod";
    Environment["Development"] = "dev";
})(Environment || (exports.Environment = Environment = {}));
function DisallowInProduction(action) {
    return function (target, propertyKey, descriptor) {
        const originalMethod = descriptor.value;
        descriptor.value = function (...args) {
            const currentEnv = process.env.ENV;
            if (currentEnv === Environment.Production) {
                const className = target.constructor.name;
                const methodName = action || propertyKey;
                throw new Error(`❌ Cannot execute "${className}.${methodName}" in production`);
            }
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
//# sourceMappingURL=disallow-in-production.decorator.js.map