"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 tokens = require("./tokens.js");
const vue = require("vue");
var tree_node_content_vue_vue_type_script_lang_default = vue.defineComponent({
  name: "ElTreeNodeContent",
  props: {
    node: {
      type: Object,
      required: true
    },
    renderContent: Function
  },
  setup(props) {
    const ns = index.useNamespace("tree");
    const nodeInstance = vue.inject(tokens.NODE_INSTANCE_INJECTION_KEY);
    const tree = vue.inject(tokens.ROOT_TREE_INJECTION_KEY);
    return () => {
      const node = props.node;
      const { data, store } = node;
      return props.renderContent ? props.renderContent(vue.h, {
        _self: nodeInstance,
        node,
        data,
        store
      }) : vue.renderSlot(tree.ctx.slots, "default", {
        node,
        data
      }, () => [vue.h(index$1.ElText, {
        tag: "span",
        truncated: true,
        class: ns.be("node", "label")
      }, () => [node.label])]);
    };
  }
});
exports.default = tree_node_content_vue_vue_type_script_lang_default;
