"use strict";

const { validateArguments } = require("@validatem/core");
const required = require("@validatem/required");

const node = require("../ast-node");

module.exports = function (operations) {
	const isConditionValue = require("../validators/operations/is-condition-value")(operations);

	return function moreThan(_name, _expression) {
		let [ expression ] = validateArguments(arguments, {
			expression: [ required, isConditionValue ]
		});
		
		return node({ type: "condition", conditionType: "moreThan", expression: expression });
	};
};
