import { ComponentDescription } from '@vtj/engine';
const Tree: ComponentDescription = {
  name: 'ElTree',
  title: '树形控件',
  groupId: 'el',
  categoryId: 'data',
  childIncludes: false,
  package: 'element-plus',
  props: [
    {
      name: 'data',
      defaultValue: '',
      setters: 'JSONSetter'
    },
    {
      name: 'empty-text',
      defaultValue: '',
      setters: 'InputSetter'
    },
    {
      name: 'node-key',
      defaultValue: '',
      setters: 'InputSetter'
    },
    {
      name: 'props',
      defaultValue: '',
      setters: 'JSONSetter'
    },
    {
      name: 'render-after-expand',
      defaultValue: true,
      setters: 'BooleanSetter'
    },
    {
      name: 'load',
      defaultValue: '',
      setters: 'JSONSetter'
    },
    {
      name: 'render-content',
      defaultValue: '',
      setters: 'JSONSetter'
    },
    {
      name: 'highlight-current',
      defaultValue: false,
      label: '高亮当前节点',
      setters: 'BooleanSetter'
    },
    {
      name: 'default-expand-all',
      defaultValue: false,
      label: '展开所有节点',
      setters: 'BooleanSetter'
    },
    {
      name: 'expand-on-click-node',
      defaultValue: true,
      title:
        '是否在点击节点的时候展开或者收缩节点， 默认值为 true，如果为 false，则只有点箭头图标的时候才会展开或者收缩节点。',
      label: 'expand-on',
      setters: 'BooleanSetter'
    },
    {
      name: 'check-on-click-node',
      defaultValue: false,
      title:
        '是否在点击节点的时候选中节点，默认值为 false，即只有在点击复选框时才会选中节点。',
      label: 'check-on',
      setters: 'BooleanSetter'
    },
    {
      name: 'auto-expand-parent',
      defaultValue: true,
      title: '展开子节点的时候是否自动展开父节点',
      label: 'expand-parent',
      setters: 'BooleanSetter'
    },
    {
      name: 'default-expanded-keys',
      defaultValue: '',
      title: '默认展开的节点的 key 的数组',
      label: 'default-expanded',
      setters: 'JSONSetter'
    },
    {
      name: 'show-checkbox',
      defaultValue: false,
      label: '节点可被选择',
      setters: 'BooleanSetter'
    },
    {
      name: 'check-strictly',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'default-checked-keys',
      defaultValue: false,
      title: '默认勾选的节点的 key 的数组',
      label: 'checked-keys',
      setters: 'JSONSetter'
    },
    {
      name: 'current-node-key',
      defaultValue: '',
      label: '选中的节点',
      setters: ['InputSetter', 'NumberSetter']
    },
    {
      name: 'filter-node-method',
      defaultValue: '',
      title: '对树节点进行筛选时执行的方法， 返回 false 则表示这个节点会被隐藏',
      label: 'filter-node',
      setters: 'ExpressionSetter'
    },
    {
      name: 'accordion',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'indent',
      defaultValue: 16,
      setters: 'NumberSetter'
    },
    {
      name: 'icon',
      defaultValue: '',
      setters: 'InputSetter'
    },
    {
      name: 'lazy',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'draggable',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'allow-drag',
      defaultValue: '',
      title: '判断节点能否被拖拽 如果返回 false ，节点不能被拖动',
      setters: 'ExpressionSetter'
    },
    {
      name: 'allow-drop',
      defaultValue: '',
      title:
        '拖拽时判定目标节点能否成为拖动目标位置。 如果返回 false ，拖动节点不能被拖放到目标节点。 type 参数有三种情况：prev、inner 和 next，分别表示放置在目标节点前、插入至目标节点和放置在目标节点后',
      setters: 'ExpressionSetter'
    }
  ],
  events: [
    'node-click',
    'node-contextmenu',
    'check-change',
    'check',
    'current-change',
    'node-expand',
    'node-collapse',
    'node-drag-start',
    'node-drag-enter',
    'node-drag-leave',
    'node-drag-over',
    'node-drop',
    'node-drag-end'
  ]
};

export default Tree;
