import { createElementBlock, openBlock, Fragment, renderSlot, createBlock, createCommentVNode, resolveDynamicComponent, mergeProps, createSlots, renderList, withCtx, normalizeProps, guardReactiveProps } from "vue";
import Start from "./StartNode.vue2.mjs";
import End from "./EndNode.vue2.mjs";
import _sfc_main$6 from "./ApprovalNode.vue.mjs";
import _sfc_main$5 from "./CcNode.vue.mjs";
import _sfc_main$4 from "./TimerNode.vue.mjs";
import _sfc_main$3 from "./NotifyNode.vue.mjs";
import _sfc_main$2 from "./ServiceNode.vue.mjs";
import _sfc_main$1 from "./ExclusiveNode.vue.mjs";
import Condition from "./ConditionNode.vue2.mjs";
const _sfc_main = {
  __name: "TreeNode",
  props: {
    node: Object
  },
  setup(__props) {
    const nodes = {
      start: Start,
      approval: _sfc_main$6,
      cc: _sfc_main$5,
      timer: _sfc_main$4,
      notify: _sfc_main$3,
      service: _sfc_main$2,
      exclusive: _sfc_main$1,
      condition: Condition,
      end: End
    };
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock(Fragment, null, [
        renderSlot(_ctx.$slots, "default"),
        (openBlock(), createBlock(resolveDynamicComponent(nodes[__props.node.type]), mergeProps({ node: __props.node }, _ctx.$attrs), createSlots({ _: 2 }, [
          renderList(_ctx.$slots, (value, name) => {
            return {
              name,
              fn: withCtx((scope) => [
                renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(scope || {})))
              ])
            };
          })
        ]), 1040, ["node"])),
        __props.node.next ? (openBlock(), createBlock(_sfc_main, mergeProps({
          key: 0,
          node: __props.node.next
        }, _ctx.$attrs), null, 16, ["node"])) : createCommentVNode("", true)
      ], 64);
    };
  }
};
export {
  _sfc_main as default
};
