"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunTreeRuleEditor = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const FlowStepEditor_1 = require("../FlowStepEditor");
// import { StyledButton } from "../../../CommonUI/Components/Button";
// import { ObserveState } from "../../../CommonUI/StateManagement/ObserveState";
// import { BaseFlowRuleStep } from "@appglue/common/dist/Flow/Steps/Rules/BaseFlowRuleStep";
// import { PropertyEditorText } from "../../../CommonUI/PropertyEditing/PropertyEditorText";
// import { StateManager } from "@appglue/common/dist/Common/StateManager";
// import { StepStrategySelectionButtonGroup } from "../Common/StepStrategySelectionButtonGroup";
// import { Layer } from "../../../CommonUI/Components/Layer";
// import { TreeRuleBuilder } from "../../../Rule/Tree/TreeRuleBuilder";
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const StepEditUI = ({ step }) => {
    //    const [open, setOpen] = React.useState<boolean>(false);
    return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})
    // <>
    //         <StyledButton color="primary" variant="contained" onClick={() => setOpen(true)}>
    //             Edit {step.name || "Rule Step"}
    //         </StyledButton>
    //         {step.needSetOutcomeName && (
    //             <ObserveState
    //                 listenTo={step}
    //                 properties={[BaseFlowRuleStep.OUTCOME_NAME]}
    //                 control={() => (
    //                     <PropertyEditorText
    //                         label="Outcome Name"
    //                         editObject={step}
    //                         propertyName={BaseFlowRuleStep.OUTCOME_NAME}
    //                         updateCallback={() => {
    //                             StateManager.propertyChanged(step, BaseFlowRuleStep.OUTCOME_NAME);
    //                         }}
    //                     />
    //                 )}
    //             />
    //         )}
    //
    //         {step.canChangeOutputStrategy && (
    //             <ObserveState
    //                 listenTo={step}
    //                 properties={[BaseFlowRuleStep.OUTCOME_STRATEGY]}
    //                 control={() => (
    //                     <StepStrategySelectionButtonGroup
    //                         editObject={step}
    //                         label="Stategy"
    //                         propertyName={BaseFlowRuleStep.OUTCOME_STRATEGY}
    //                         updateCallback={() => {
    //                             // if (step.sequence && step.sequence?.editContext) {
    //                             //     step.sequence?.editContext?.onStepEdit(step.sequence, step);
    //                             // }
    //                             StateManager.propertyChanged(step, BaseFlowRuleStep.OUTCOME_STRATEGY);
    //                         }}
    //                     />
    //                 )}
    //             />
    //         )}
    //
    //         <UILayer
    //             open={open}
    //             maxWidth={false}
    //             fullScreen
    //             padding="0px 0px"
    //             renderUI={() => (
    //                 <TreeRuleBuilder
    //                     ruleDefinition={step.executable}
    //                     title={step.executable.title || step.name}
    //                     onRuleCancel={() => {
    //                         setOpen(false);
    //                     }}
    //                     onRuleSave={() => {
    //                         StateManager.changed(step);
    //                         setOpen(false);
    //                     }}
    //                 />
    //             )}
    //             onClose={() => setOpen(false)}
    //         />
    //     </>
    );
};
class RunTreeRuleEditor extends FlowStepEditor_1.FlowStepEditor {
    renderEditUI() {
        return (0, jsx_runtime_1.jsx)(StepEditUI, { step: this.stepData });
    }
}
exports.RunTreeRuleEditor = RunTreeRuleEditor;
//# sourceMappingURL=RunTreeRuleEditor.js.map