"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Managed = exports.enableManaged = exports.disableManaged = void 0;
const trace_1 = require("./trace");
function disableManaged() {
    trace_1.TraceManager.enabled = false;
}
exports.disableManaged = disableManaged;
function enableManaged() {
    trace_1.TraceManager.enabled = true;
}
exports.enableManaged = enableManaged;
function Managed() {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    return (target, name, descriptor) => {
        if (!trace_1.TraceManager.enabled)
            return target;
        let trace = null;
        trace = (0, trace_1.RegisterTraceGetter)(target, name, descriptor);
        if (trace)
            return trace;
        trace = (0, trace_1.RegisterTraceSetter)(target, name, descriptor);
        if (trace)
            return trace;
        return (0, trace_1.RegisterTraceClass)(target);
    };
}
exports.Managed = Managed;
//# sourceMappingURL=managed.js.map