"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useDebuggerOnce = exports.useDebugger = void 0;
const react_1 = __importDefault(require("react"));
const utility_1 = require("../utility");
const useDebugger = (namespace, message, value) => {
    react_1.default.useEffect(() => {
        utility_1.debug.log(namespace, message, value);
    }, [value]);
};
exports.useDebugger = useDebugger;
let useDebuggerOnceCache = {};
const useDebuggerOnce = (namespace, message, value) => {
    react_1.default.useEffect(() => {
        if (useDebuggerOnceCache[`${namespace}:${message}`]) {
            return;
        }
        useDebuggerOnceCache[`${namespace}:${message}`] = true;
        utility_1.debug.log(namespace, message, value);
    }, []);
};
exports.useDebuggerOnce = useDebuggerOnce;
//# sourceMappingURL=useDebugger.js.map