import isArray_default from "./isArray.js";
import _baseUnary_default from "./_baseUnary.js";
import identity_default from "./identity.js";
import _arrayMap_default from "./_arrayMap.js";
import _baseGet_default from "./_baseGet.js";
import _baseIteratee_default from "./_baseIteratee.js";
import _baseMap_default from "./_baseMap.js";
import _baseSortBy_default from "./_baseSortBy.js";
import _compareMultiple_default from "./_compareMultiple.js";
function baseOrderBy(l, u, d) {
	u = u.length ? _arrayMap_default(u, function(s) {
		return isArray_default(s) ? function(e) {
			return _baseGet_default(e, s.length === 1 ? s[0] : s);
		} : s;
	}) : [identity_default];
	var f = -1;
	return u = _arrayMap_default(u, _baseUnary_default(_baseIteratee_default)), _baseSortBy_default(_baseMap_default(l, function(e, s, c) {
		return {
			criteria: _arrayMap_default(u, function(s) {
				return s(e);
			}),
			index: ++f,
			value: e
		};
	}), function(e, s) {
		return _compareMultiple_default(e, s, d);
	});
}
var _baseOrderBy_default = baseOrderBy;
export { _baseOrderBy_default as default };
