"use client";
'use strict';

var useCombineValues = require('./use-combine-values.js');
var index = require('../../../../../../motion-dom@12.38.0/node_modules/motion-dom/dist/es/value/index.js');

function useComputed(compute) {
    /**
     * Open session of collectMotionValues. Any MotionValue that calls get()
     * will be saved into this array.
     */
    index.collectMotionValues.current = [];
    compute();
    const value = useCombineValues.useCombineMotionValues(index.collectMotionValues.current, compute);
    /**
     * Synchronously close session of collectMotionValues.
     */
    index.collectMotionValues.current = undefined;
    return value;
}

exports.useComputed = useComputed;
