import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { BaseExpression } from "../../BaseExpression";
import { ExpressionValue } from "../../ExpressionValue";
import { ExpressionValueRenderer } from "../../ExpressionValueRenderer";
import { ExpressionPiece } from "../../ExpressionStyles";
import { GroupedBracketedDiv } from "../Logic/Grouping";
export class AddExpression extends BaseExpression {
    constructor() {
        super();
        this.__type = "Add";
        this.value1 = ExpressionValue.createExpressionValue(this, "value1");
        this.value2 = ExpressionValue.createExpressionValue(this, "value2");
    }
    render() {
        return (_jsxs(GroupedBracketedDiv, Object.assign({ issue: this.getValidationIssues()[0] }, { children: [_jsx(ExpressionPiece, { children: _jsx(ExpressionValueRenderer, { el: this.value1 }, void 0) }, void 0),
                _jsx(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=AddExpression.js.map