import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { BaseExpression } from "../../BaseExpression";
import { ExpressionValue } from "../../ExpressionValue";
import { ExpressionValueRenderer } from "../../ExpressionValueRenderer";
import { BracketedDiv, ExpressionPiece } from "../../ExpressionStyles";
import { NumberDataDefinition } from "../../../Common/Data/Definitions/NumberDataDefinition";
export class RoundExpression extends BaseExpression {
    constructor() {
        super();
        this.__type = "Round";
        this.expressionValueType = new NumberDataDefinition();
        this.value1 = ExpressionValue.createExpressionValue(this, "value1");
    }
    render() {
        return (_jsxs(ExpressionPiece, { children: ["round", _jsx(BracketedDiv, { children: _jsx(ExpressionValueRenderer, { el: this.value1 }, void 0) }, void 0)] }, void 0));
    }
    evaluate(data, testContext) {
        return Math.round(this.value1.evaluate(data, testContext));
    }
}
//# sourceMappingURL=RoundExpression.js.map