import baseFlatten from "./_baseFlatten.js";
import baseOrderBy from "./_baseOrderBy.js";
import baseRest from "./_baseRest.js";
import isIterateeCall from "./_isIterateeCall.js";
var sortBy = baseRest(function(collection, iteratees) {
  if (collection == null) {
    return [];
  }
  var length = iteratees.length;
  if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
    iteratees = [];
  } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
    iteratees = [iteratees[0]];
  }
  return baseOrderBy(collection, baseFlatten(iteratees), []);
});
export {
  sortBy as default
};
//# sourceMappingURL=sortBy.js.map
