"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _locale = require("../../src/locale");
var _setters = require("../_setters");
var _utils = require("../_utils/utils");
var _loopData = _interopRequireDefault(require("../_com-props/loopData"));
var _componentKey = _interopRequireDefault(require("../_com-props/componentKey"));
var _componentName = _interopRequireDefault(require("../_com-props/componentName"));
var _flowEventConfig = require("../_com-props/flowEventConfig");
var Meta = {
  componentName: "EngineRuleUltra",
  title: "EngineRuleUltra",
  docUrl: "",
  screenshot: "",
  devMode: "proCode",
  group: (0, _locale.t)("engine-rule-ultra.key_utlsyUH9u6VC"),
  category: "Business",
  props: [_loopData["default"], _componentKey["default"], _componentName["default"], {
    name: "pluginId",
    title: {
      label: (0, _locale.t)("engine-rule-ultra.key_ZBXO1tm6SXLA"),
      tip: "pluginId"
    },
    setter: _setters.CStringOnlySetter,
    defaultValue: function defaultValue() {
      return 58;
    },
    condition: function condition() {
      return false;
    }
  }, (0, _flowEventConfig.getFlowEventConfig)({
    label: (0, _locale.t)("engine-rule-ultra.key_VWhPwIWkeDIq"),
    tip: (0, _locale.t)("engine-rule-ultra.key_tzBPxhOyF5Xh"),
    props: {
      // 如果插件中需要配置规则，则需要给定pluginId
      pluginId: 58
    }
  }), {
    name: "ruleNodeGroupConfig",
    title: {
      label: (0, _locale.t)("engine-rule-ultra.key_XyPFNTHOw5XD"),
      tip: (0, _locale.t)("engine-rule-ultra.key_KwKZlyrWKEC2")
    },
    setter: _setters.CRuleNodeListSetter
  }, {
    title: (0, _locale.t)("engine-rule-ultra.buttonStatusText"),
    display: "block",
    type: "group",
    items: [{
      name: "buttonTextDictionaryKey",
      title: {
        label: (0, _locale.t)("engine-rule-ultra.buttonTextMulLang"),
        tip: (0, _locale.t)("engine-rule-ultra.buttonTextMulLang")
      },
      setter: "DictionarySetter",
      props: {
        type: "text"
      }
    }, {
      name: "buttonText",
      title: {
        label: (0, _locale.t)("engine-rule-ultra.buttonText"),
        tip: (0, _locale.t)("engine-rule-ultra.buttonTextTip")
      },
      propType: "string",
      setter: "StringSetter"
    }, {
      name: "buttonLoadingTextDictionaryKey",
      title: {
        label: (0, _locale.t)("engine-rule-ultra.buttonLoadingTextMulLang"),
        tip: (0, _locale.t)("engine-rule-ultra.buttonLoadingTextMulLang")
      },
      setter: "DictionarySetter",
      props: {
        type: "text"
      }
    }, {
      name: "buttonLoadingText",
      title: {
        label: (0, _locale.t)("engine-rule-ultra.buttonLoadingText"),
        tip: (0, _locale.t)("engine-rule-ultra.buttonLoadingText")
      },
      propType: "string",
      setter: "StringSetter"
    }, {
      name: "buttonExecutingTextDictionaryKey",
      title: {
        label: (0, _locale.t)("engine-rule-ultra.buttonExecutingTextMulLang"),
        tip: (0, _locale.t)("engine-rule-ultra.buttonExecutingTextMulLang")
      },
      setter: "DictionarySetter",
      props: {
        type: "text"
      }
    }, {
      name: "buttonExecutingText",
      title: {
        label: (0, _locale.t)("engine-rule-ultra.buttonExecutingText"),
        tip: (0, _locale.t)("engine-rule-ultra.buttonExecutingText")
      },
      propType: "string",
      setter: "StringSetter"
    }, {
      name: "buttonWalletNotConnectedTextDictionaryKey",
      title: {
        label: (0, _locale.t)("engine-rule-ultra.buttonNotConnectedTextMulLang"),
        tip: (0, _locale.t)("engine-rule-ultra.buttonNotConnectedTextMulLang")
      },
      setter: "DictionarySetter",
      props: {
        type: "text"
      }
    }, {
      name: "buttonWalletNotConnectedText",
      title: {
        label: (0, _locale.t)("engine-rule-ultra.buttonNotConnectedText"),
        tip: (0, _locale.t)("engine-rule-ultra.buttonNotConnectedText")
      },
      propType: "string",
      setter: "StringSetter"
    }],
    condition: function condition(target) {
      var _ruleNodeGroupConfig$, _ruleNodeGroupConfig$2, _ruleNodeGroupConfig$3, _ruleNodeGroupConfig$4;
      var ruleNodeGroupConfig = target.parent.getPropValue("ruleNodeGroupConfig");
      return (ruleNodeGroupConfig === null || ruleNodeGroupConfig === void 0 ? void 0 : (_ruleNodeGroupConfig$ = ruleNodeGroupConfig.ruleConfig) === null || _ruleNodeGroupConfig$ === void 0 ? void 0 : (_ruleNodeGroupConfig$2 = _ruleNodeGroupConfig$.config) === null || _ruleNodeGroupConfig$2 === void 0 ? void 0 : _ruleNodeGroupConfig$2.pageKey) === "inputButton" || (ruleNodeGroupConfig === null || ruleNodeGroupConfig === void 0 ? void 0 : (_ruleNodeGroupConfig$3 = ruleNodeGroupConfig.ruleConfig) === null || _ruleNodeGroupConfig$3 === void 0 ? void 0 : (_ruleNodeGroupConfig$4 = _ruleNodeGroupConfig$3.config) === null || _ruleNodeGroupConfig$4 === void 0 ? void 0 : _ruleNodeGroupConfig$4.pageKey) === "executeButton";
    }
  }, {
    name: "inputCheckSwitch",
    title: {
      label: (0, _locale.t)("engine-rule-ultra.inputCheck"),
      tip: (0, _locale.t)("engine-rule-ultra.inputCheckTip")
    },
    propType: {
      type: "oneOf",
      value: [1, 2, 3]
    },
    setter: [{
      componentName: "RadioGroupSetter",
      props: {
        options: [{
          title: (0, _locale.t)("engine-rule-ultra.inputCheckNone"),
          value: 1
        }, {
          title: (0, _locale.t)("engine-rule-ultra.inputCheckPrev"),
          value: 2
        }, {
          title: (0, _locale.t)("engine-rule-ultra.inputCheckCalling"),
          value: 3
        }]
      }
    }, "VariableSetter"],
    defaultValue: 1,
    condition: function condition(target) {
      var _ruleNodeGroupConfig$5, _ruleNodeGroupConfig$6;
      var ruleNodeGroupConfig = target.parent.getPropValue("ruleNodeGroupConfig");
      return (ruleNodeGroupConfig === null || ruleNodeGroupConfig === void 0 ? void 0 : (_ruleNodeGroupConfig$5 = ruleNodeGroupConfig.ruleConfig) === null || _ruleNodeGroupConfig$5 === void 0 ? void 0 : (_ruleNodeGroupConfig$6 = _ruleNodeGroupConfig$5.config) === null || _ruleNodeGroupConfig$6 === void 0 ? void 0 : _ruleNodeGroupConfig$6.pageKey) === "inputButton";
    }
  }, {
    name: "stepQueryPopSwitch",
    title: {
      label: (0, _locale.t)("engine-rule-ultra.requireStepBar"),
      tip: (0, _locale.t)("engine-rule-ultra.requireStepBarTip")
    },
    propType: "bool",
    setter: "BoolSetter",
    defaultValue: false,
    condition: function condition(target) {
      var _ruleNodeGroupConfig$7, _ruleNodeGroupConfig$8, _ruleNodeGroupConfig$9, _ruleNodeGroupConfig$10;
      var ruleNodeGroupConfig = target.parent.getPropValue("ruleNodeGroupConfig");
      return (ruleNodeGroupConfig === null || ruleNodeGroupConfig === void 0 ? void 0 : (_ruleNodeGroupConfig$7 = ruleNodeGroupConfig.ruleConfig) === null || _ruleNodeGroupConfig$7 === void 0 ? void 0 : (_ruleNodeGroupConfig$8 = _ruleNodeGroupConfig$7.config) === null || _ruleNodeGroupConfig$8 === void 0 ? void 0 : _ruleNodeGroupConfig$8.pageKey) === "inputButton" || (ruleNodeGroupConfig === null || ruleNodeGroupConfig === void 0 ? void 0 : (_ruleNodeGroupConfig$9 = ruleNodeGroupConfig.ruleConfig) === null || _ruleNodeGroupConfig$9 === void 0 ? void 0 : (_ruleNodeGroupConfig$10 = _ruleNodeGroupConfig$9.config) === null || _ruleNodeGroupConfig$10 === void 0 ? void 0 : _ruleNodeGroupConfig$10.pageKey) === "executeButton";
    }
  }, {
    title: (0, _locale.t)("engine-rule-ultra.buttonStatus"),
    display: "block",
    type: "group",
    items: [{
      name: "ruleLoadingStyle",
      title: (0, _locale.t)("engine-rule-ultra.loadingStyle"),
      type: "group",
      extraProps: {
        display: "entry"
      },
      items: [{
        name: "ruleLoadingStyle",
        title: {
          label: (0, _locale.t)("engine-rule-ultra.loadingStyle"),
          tip: (0, _locale.t)("engine-rule-ultra.loadingStyleTip")
        },
        setter: "CStyleSetter",
        extraProps: {
          display: "block"
        }
      }]
    }, {
      name: "ruleWalletNotConnectedStyle",
      title: (0, _locale.t)("engine-rule-ultra.notConnectedStyle"),
      type: "group",
      extraProps: {
        display: "entry"
      },
      items: [{
        name: "ruleWalletNotConnectedStyle",
        title: {
          label: (0, _locale.t)("engine-rule-ultra.notConnectedStyle"),
          tip: (0, _locale.t)("engine-rule-ultra.notConnectedStyleTip")
        },
        setter: "CStyleSetter",
        extraProps: {
          display: "block"
        }
      }]
    }, {
      name: "ruleHoverStyle",
      title: (0, _locale.t)("engine-rule-ultra.hoverStyle"),
      type: "group",
      extraProps: {
        display: "entry"
      },
      items: [{
        name: "ruleHoverStyle",
        title: {
          label: (0, _locale.t)("engine-rule-ultra.hoverStyle"),
          tip: (0, _locale.t)("engine-rule-ultra.hoverStyleTip")
        },
        setter: "CStyleSetter",
        extraProps: {
          display: "block"
        }
      }]
    }, {
      name: "ruleActiveStyle",
      title: (0, _locale.t)("engine-rule-ultra.activeStyle"),
      type: "group",
      extraProps: {
        display: "entry"
      },
      items: [{
        name: "ruleActiveStyle",
        title: {
          label: (0, _locale.t)("engine-rule-ultra.activeStyle"),
          tip: (0, _locale.t)("engine-rule-ultra.activeStyle")
        },
        setter: "CStyleSetter",
        extraProps: {
          display: "block"
        }
      }]
    }, {
      name: "ruleExecutingStyle",
      title: (0, _locale.t)("engine-rule-ultra.executingStyle"),
      type: "group",
      extraProps: {
        display: "entry"
      },
      items: [{
        name: "ruleExecutingStyle",
        title: {
          label: (0, _locale.t)("engine-rule-ultra.executingStyle"),
          tip: (0, _locale.t)("engine-rule-ultra.executingStyleTip")
        },
        setter: "CStyleSetter",
        extraProps: {
          display: "block"
        }
      }]
    }, {
      name: "ruleDisableStyle",
      title: (0, _locale.t)("engine-rule-ultra.disableStyle"),
      type: "group",
      extraProps: {
        display: "entry"
      },
      items: [{
        name: "ruleDisableStyle",
        title: {
          label: (0, _locale.t)("engine-rule-ultra.disableStyle"),
          tip: (0, _locale.t)("engine-rule-ultra.disableStyleTip")
        },
        setter: "CStyleSetter",
        extraProps: {
          display: "block"
        }
      }]
    }, {
      name: "ruleTipStyle",
      title: (0, _locale.t)("engine-rule-ultra.tipStyle"),
      type: "group",
      extraProps: {
        display: "entry"
      },
      items: [{
        name: "ruleTipStyle",
        title: {
          label: (0, _locale.t)("engine-rule-ultra.tipStyle"),
          tip: (0, _locale.t)("engine-rule-ultra.tipStyle")
        },
        setter: "CStyleSetter",
        extraProps: {
          display: "block"
        }
      }]
    }],
    condition: function condition(target) {
      var _ruleNodeGroupConfig$11, _ruleNodeGroupConfig$12, _ruleNodeGroupConfig$13, _ruleNodeGroupConfig$14;
      var ruleNodeGroupConfig = target.parent.getPropValue("ruleNodeGroupConfig");
      return (ruleNodeGroupConfig === null || ruleNodeGroupConfig === void 0 ? void 0 : (_ruleNodeGroupConfig$11 = ruleNodeGroupConfig.ruleConfig) === null || _ruleNodeGroupConfig$11 === void 0 ? void 0 : (_ruleNodeGroupConfig$12 = _ruleNodeGroupConfig$11.config) === null || _ruleNodeGroupConfig$12 === void 0 ? void 0 : _ruleNodeGroupConfig$12.pageKey) === "inputButton" || (ruleNodeGroupConfig === null || ruleNodeGroupConfig === void 0 ? void 0 : (_ruleNodeGroupConfig$13 = ruleNodeGroupConfig.ruleConfig) === null || _ruleNodeGroupConfig$13 === void 0 ? void 0 : (_ruleNodeGroupConfig$14 = _ruleNodeGroupConfig$13.config) === null || _ruleNodeGroupConfig$14 === void 0 ? void 0 : _ruleNodeGroupConfig$14.pageKey) === "executeButton";
    }
  }],
  configure: {
    supports: {
      style: true,
      events: false,
      loop: false,
      condition: false
    }
  }
};
var snippets = [{
  title: (0, _locale.t)("engine-rule-pro.key_pJdXSat87UcS"),
  screenshot: "https://s3.ap-east-1.amazonaws.com/res.os/icon/comp/EngineRule.png",
  schema: {
    componentName: "EngineRuleUltra",
    props: {
      componentKey: "cr_" + (0, _utils.uuid)()
    }
  }
}];
var _default = exports["default"] = (0, _extends2["default"])({}, Meta, {
  snippets: snippets
});