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