"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useTemptiflySync = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const useTemptiflySync = ({ values, onValuesChanged }) => {
    const initRenderRef = React.useRef(true);
    React.useEffect(() => onValuesChanged(values, initRenderRef.current), [onValuesChanged, values]);
    React.useEffect(() => {
        initRenderRef.current = false;
    }, []);
    const nameInputRef = React.useRef();
    React.useEffect(() => {
        var _a;
        (_a = nameInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
    }, []);
};
exports.useTemptiflySync = useTemptiflySync;
//# sourceMappingURL=useTemptiflySync.js.map