"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useRunOnceAfterValueInitialization = void 0;
var react_1 = require("react");
var useRunOnceAfterValueInitialization = function (cb, value) {
    var isValueInited = (0, react_1.useRef)(false);
    (0, react_1.useEffect)(function () {
        if (value && !isValueInited.current) {
            isValueInited.current = true;
            cb();
        }
    }, [cb, value]);
};
exports.useRunOnceAfterValueInitialization = useRunOnceAfterValueInitialization;
