import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ExpressionValue } from "../../ExpressionValue";
import { ExpressionValueRenderer } from "../../ExpressionValueRenderer";
import { ExpressionPiece } from "../../ExpressionStyles";
import { GroupedBracketedDiv } from "../Logic/Grouping";
import { StringDataDefinition } from "../../../Common/Data/Definitions/StringDataDefinition";
import { BaseLogicExpression } from "../Logic/BaseLogic";
import { BooleanDataDefinition } from "../../../Common/Data/Definitions/BooleanDataDefinition";
export class StringEqualExpression extends BaseLogicExpression {
    constructor() {
        super();
        this.__type = "String Equal";
        this.expressionValueType = new BooleanDataDefinition();
        this.value1 = ExpressionValue.createExpressionValue(this, "value1", new StringDataDefinition());
        this.value2 = ExpressionValue.createExpressionValue(this, "value2", new StringDataDefinition());
    }
    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=StringEqualExpression.js.map