import { jsx as _jsx } from "react/jsx-runtime";
import { BaseTestResultData } from "../../../Common/Testing/TestResultData";
import { TestResultDataType } from "../../../Common/Testing/TestResultDataType";
import { TreeRuleDesigner } from "../Components/TreeRuleDesigner";
import { TreeRuleEditContext } from "../TreeRuleEditContext";
export class TreeRuleTestResult extends BaseTestResultData {
    constructor() {
        super(...arguments);
        this.type = TestResultDataType.TREE_RULE;
    }
    set definition(definition) {
        this._definition = definition;
        if (this._definition) {
            this.editContext = new TreeRuleEditContext(this._definition);
        }
    }
    get definition() {
        return this._definition;
    }
    render() {
        return this.definition && this.editContext ? (_jsx(TreeRuleDesigner, { ruleDefinition: this.definition, editContext: this.editContext }, void 0)) : undefined;
    }
}
//# sourceMappingURL=TreeRuleTestResult.js.map