import { useContext, useMemo } from "react";
import { MotionContext } from "./dist-es-context-MotionContext-index.js";
import { getCurrentTreeVariants } from "./dist-es-context-MotionContext-utils.js";
function useCreateMotionContext(props) {
  const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));
  return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
}
function variantLabelsAsDependency(prop) {
  return Array.isArray(prop) ? prop.join(" ") : prop;
}
export {
  useCreateMotionContext
};
//# sourceMappingURL=dist-es-context-MotionContext-create.js.map
