"use client";
'use strict';

var React = require('react');
var index = require('./index.js');
var utils = require('./utils.js');

function useCreateMotionContext(props) {
    const { initial, animate } = utils.getCurrentTreeVariants(props, React.useContext(index.MotionContext));
    return React.useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
}
function variantLabelsAsDependency(prop) {
    return Array.isArray(prop) ? prop.join(" ") : prop;
}

exports.useCreateMotionContext = useCreateMotionContext;
