class ConditionEditorFieldEditorPresenter extends FieldEditorPresenter<ScriptTypeValue> {

    void onSimpleConditionChange(Condition oldValue, Condition newValue) {
        if (simpleConditionEditor.isValid()) {
            conditionEditorGeneratorService
                    .call(newValue)
                    .then(result -> {
                        onSimpleConditionChange(result);
                        return null;
                    })
                    .catch_(throwable -> {
                        onSimpleConditionChangeError((Throwable) throwable);
                        return null;
                    });
        } else {
            clearError();
        }
    }

    @Inject public  ConditionEditorFieldEditorPresenter(final View view,
                                               final SimpleConditionEditorPresenter simpleConditionEditor,
                                               final ScriptTypeFieldEditorPresenter scriptEditor,
                                               final ErrorPopupPresenter errorPopup,
                                               final ConditionEditorParsingService conditionEditorParsingService,
                                               final ConditionEditorGeneratorService conditionEditorGeneratorService,
                                               final ClientTranslationService translationService);

}