'use strict';

require('../../../utils/index.js');
var runtime = require('../../../utils/props/runtime.js');

"use strict";
const treeProps = runtime.buildProps({
  selectedKeys: {
    type: runtime.definePropType(Array)
  },
  expandedKeys: {
    type: runtime.definePropType(Array)
  },
  checkedKeys: {
    type: runtime.definePropType([Array, Object])
  },
  treeData: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  // 默认展开所有树节点
  defaultExpandAll: {
    type: Boolean,
    default: false
  },
  // 映射字段
  fieldNames: {
    type: runtime.definePropType(Object),
    default: () => ({
      children: "children",
      title: "title",
      key: "key"
    })
  },
  // 支持多选
  multiple: {
    type: Boolean,
    default: false
  },
  // 父子节点选中状态不再关联
  checkStrictly: {
    type: Boolean,
    default: false
  },
  // 展开的图标
  expandIcon: {
    type: runtime.definePropType(Object)
  },
  // 收起的图标
  collapseIcon: {
    type: runtime.definePropType(Object)
  },
  // 虚拟滚动
  virtual: {
    type: Boolean,
    default: true
  },
  // 组件高度
  height: {
    type: Number
  },
  // 显示标题前图标
  showIcon: {
    type: Boolean,
    default: false
  },
  // 点击行展开
  clickRowExpand: {
    type: Boolean,
    default: false
  },
  // 开启操作按钮
  enableOperate: {
    type: Boolean,
    default: false
  },
  // 启用异步加载
  enableLazyLoad: {
    type: Boolean,
    default: false
  },
  // 异步加载函数
  loadData: {
    type: runtime.definePropType(Function)
  },
  // 缓存已加载数据
  cacheLoadedData: {
    type: Boolean,
    default: true
  },
  // 已经加载的节点
  loadedKeys: {
    type: runtime.definePropType(Array)
  },
  // 连接线
  showLine: {
    type: Boolean,
    default: false
  },
  // 显示叶子图标
  showLeafIcon: {
    type: Boolean,
    default: false
  },
  // 文本颜色
  textColor: {
    type: String,
    default: "var(--color-text)"
  },
  // 文本大小
  textSize: {
    type: Number,
    default: 14
  },
  // 图标大小
  iconSize: Number,
  // 图标颜色
  iconColor: String
});
const treeEmits = {
  "update:selectedKeys": (value) => !!value,
  "update:expandedKeys": (value) => !!value,
  "update:checkedKeys": (value) => !!value,
  expand: (expandedKeys, e) => !!expandedKeys || !!e,
  select: (selectKeys, e) => !!selectKeys || !!e,
  check: (checkKeys, e) => !!checkKeys || !!e,
  nodeClick: (nodeData) => !!nodeData
};

exports.treeEmits = treeEmits;
exports.treeProps = treeProps;
//# sourceMappingURL=tree.js.map
