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";
export class StringListNotAllInExpression extends BaseLogicExpression {
    constructor() {
        super();
        this.__type = "String List Not All In";
        let dd = new StringDataDefinition();
        dd.list = true;
        this.value1 = ExpressionValue.createExpressionValue(this, "value1", dd);
        this.value2 = ExpressionValue.createExpressionValue(this, "value2", dd);
    }
    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: " all not in " }, void 0),
                _jsx(ExpressionPiece, { children: _jsx(ExpressionValueRenderer, { el: this.value2 }, void 0) }, void 0)] }), void 0));
    }
    evaluate(data, testContext) {
        let value2 = this.value2.evaluate(data, testContext);
        return !!this.value1.evaluate(data, testContext).find((s) => !value2.includes(s));
    }
}
//# sourceMappingURL=StringListNotAllInExpression.js.map