import "../../../../../node_modules/element-plus/es/index.mjs";
/* empty css                                                             */
/* empty css                                                                */
import { inject, ref, computed, createElementBlock, openBlock, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString } from "vue";
/* empty css             */
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
import { ElText } from "../../../../../node_modules/element-plus/es/components/text/index.mjs";
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 = inject("flowDesign", { readOnly: ref(false) });
    const $emits = __emit;
    const $props = __props;
    const _readOnly = 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 = ElText;
      return openBlock(), createElementBlock("div", _hoisted_1, [
        _cache[0] || (_cache[0] = createElementVNode("div", { class: "end-node-circle" }, null, -1)),
        createElementVNode("div", {
          class: "end-node",
          onClick: activeNode
        }, [
          createVNode(_component_el_text, null, {
            default: withCtx(() => [
              createTextVNode(toDisplayString(__props.node.name), 1)
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
};
const End = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d22e0892"]]);
export {
  End as default
};
