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 { BooleanDataDefinition } from "../../../Common/Data/Definitions/BooleanDataDefinition";
export class IsTrueExpression extends BaseLogicExpression {
    constructor() {
        super();
        this.__type = "Is True";
        this.value1 = ExpressionValue.createExpressionValue(this, "value1", new BooleanDataDefinition());
        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),
                _jsx(ExpressionPiece, { children: "is true" }, void 0)] }), void 0));
    }
    evaluate(data, testContext) {
        return this.value1.evaluate(data, testContext) === true;
    }
}
//# sourceMappingURL=IsTrue.js.map