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 AbsoluteExpression extends BaseExpression {
    constructor() {
        super();
        this.__type = "Absolute";
        this.expressionValueType = new NumberDataDefinition();
        this.value1 = ExpressionValue.createExpressionValue(this, "absolute");
    }
    render() {
        return (_jsxs(ExpressionPiece, { children: ["absolute", _jsx(BracketedDiv, { children: _jsx(ExpressionValueRenderer, { el: this.value1 }, void 0) }, void 0)] }, void 0));
    }
    evaluate(data, testContext) {
        return Math.abs(this.value1.evaluate(data, testContext));
    }
}
//# sourceMappingURL=AbsoluteExpression.js.map