import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { BaseLogicExpression } from "./BaseLogic";
import { ExpressionValue } from "../../ExpressionValue";
import { ExpressionValueRenderer } from "../../ExpressionValueRenderer";
import { ExpressionPiece } from "../../ExpressionStyles";
import { GroupedBracketedDiv } from "./Grouping";
import { NumberDataDefinition } from "../../../Common/Data/Definitions/NumberDataDefinition";
import { BooleanDataDefinition } from "../../../Common/Data/Definitions/BooleanDataDefinition";
export class LessThanExpression extends BaseLogicExpression {
    constructor() {
        super();
        this.__type = "Less Than";
        this.value1 = ExpressionValue.createExpressionValue(this, "value1", new NumberDataDefinition());
        this.value2 = ExpressionValue.createExpressionValue(this, "value2", new NumberDataDefinition());
        this.expressionValueType = new BooleanDataDefinition();
    }
    render() {
        return (_jsxs(GroupedBracketedDiv, Object.assign({ issue: this.getValidationIssues()[0] }, { children: [_jsx(ExpressionPiece, { children: _jsx(ExpressionValueRenderer, { el: this.value1 }, void 0) }, void 0),
                _jsxs(ExpressionPiece, { children: [" ", "<", " "] }, void 0),
                _jsx(ExpressionPiece, { children: _jsx(ExpressionValueRenderer, { el: this.value2 }, void 0) }, void 0)] }), void 0));
    }
    evaluate(data, testContext) {
        return this.value1.evaluate(data, testContext) < this.value2.evaluate(data, testContext);
    }
}
//# sourceMappingURL=LessThan.js.map