"use strict";
"use client";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useRefWithInit = useRefWithInit;
const react_1 = require("react");
const UNINITIALIZED = {};
function useRefWithInit(init, initArg) {
    const ref = (0, react_1.useRef)(UNINITIALIZED);
    if (ref.current === UNINITIALIZED) {
        ref.current = init(initArg);
    }
    return ref;
}
//# sourceMappingURL=useRefWithInit.js.map