import { QueryLanguage } from "@contember/binding";
const getColumnOrderBy = (columns, key, direction, environment) => {
  const column = columns.get(key);
  if (column === void 0 || column.enableOrdering === false) {
    return void 0;
  }
  const sugaredOrderBy = column.getNewOrderBy(direction, {
    environment
  });
  if (sugaredOrderBy === void 0) {
    return void 0;
  }
  return QueryLanguage.desugarOrderBy(sugaredOrderBy, environment);
};
export { getColumnOrderBy };
//# sourceMappingURL=getColumnOrderBy.js.map
