"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");
;/* empty css             */
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
const index = require("../../../../../node_modules/element-plus/es/components/text/index.js");
const _hoisted_1 = { class: "node-box" };
const _sfc_main = {
  __name: "EndNode",
  props: {
    node: Object,
    readOnly: {
      type: Boolean,
      default: false
    }
  },
  emits: ["activeNode"],
  setup(__props, { emit: __emit }) {
    const _inject = Vue.inject("flowDesign", { readOnly: Vue.ref(false) });
    const $emits = __emit;
    const $props = __props;
    const _readOnly = Vue.computed(() => {
      var _a;
      return ((_a = _inject.readOnly) == null ? void 0 : _a.value) || $props.readOnly;
    });
    const activeNode = () => {
      if (_readOnly.value) return;
      $emits("activeNode", $props.node);
    };
    return (_ctx, _cache) => {
      const _component_el_text = index.ElText;
      return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
        _cache[0] || (_cache[0] = Vue.createElementVNode("div", { class: "end-node-circle" }, null, -1)),
        Vue.createElementVNode("div", {
          class: "end-node",
          onClick: activeNode
        }, [
          Vue.createVNode(_component_el_text, null, {
            default: Vue.withCtx(() => [
              Vue.createTextVNode(Vue.toDisplayString(__props.node.name), 1)
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
};
const End = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-d22e0892"]]);
exports.default = End;
