"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../../hooks/use-namespace/index.js");
const index$1 = require("../../text/index.js");
const virtualTree = require("./virtual-tree.js");
const Vue = require("vue");
var tree_node_content_default = Vue.defineComponent({
  name: "ElTreeNodeContent",
  props: virtualTree.treeNodeContentProps,
  setup(props) {
    const tree = Vue.inject(virtualTree.ROOT_TREE_INJECTION_KEY);
    const ns = index.useNamespace("tree");
    return () => {
      const node = props.node;
      const { data } = node;
      return (tree == null ? void 0 : tree.ctx.slots.default) ? tree.ctx.slots.default({
        node,
        data
      }) : Vue.h(index$1.ElText, {
        tag: "span",
        truncated: true,
        class: ns.be("node", "label")
      }, () => [node == null ? void 0 : node.label]);
    };
  }
});
exports.default = tree_node_content_default;
