"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../node_modules/element-plus/es/index.js");
;/* empty css                                                             */
;/* empty css                                                                */
const Vue = require("vue");
const Node = require("./Node.vue2.js");
const index = require("../../../../../node_modules/element-plus/es/components/text/index.js");
const _sfc_main = {
  __name: "ServiceNode",
  props: {
    node: Object
  },
  setup(__props) {
    const { nodesError } = Vue.inject("flowDesign", { nodesError: Vue.ref({}) });
    const props = __props;
    const content = Vue.ref("");
    Vue.watchEffect(() => {
      const errors = [];
      const { id, name, implementationType, implementation } = props.node;
      if (!implementationType) {
        errors.push({ id, name, message: "执行类型为空" });
        content.value = "执行类型为空";
      } else if (!implementation) {
        errors.push({ id, name, message: "执行值为空" });
        content.value = "执行值为空";
      } else {
        content.value = `执行服务`;
      }
      if (errors.length > 0) {
        nodesError.value[id] = errors;
      } else {
        delete nodesError.value[id];
      }
    });
    return (_ctx, _cache) => {
      const _component_el_text = index.ElText;
      return Vue.openBlock(), Vue.createBlock(Node.default, Vue.mergeProps(_ctx.$attrs, {
        icon: "el:Tools",
        color: "#ffc107",
        node: __props.node
      }), {
        default: Vue.withCtx(() => [
          Vue.createVNode(_component_el_text, null, {
            default: Vue.withCtx(() => [
              Vue.createTextVNode(Vue.toDisplayString(Vue.unref(content)), 1)
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 16, ["node"]);
    };
  }
};
exports.default = _sfc_main;
