import { ComponentDescription } from '@vtj/engine';

const Tabs: ComponentDescription[] = [
  {
    name: 'ElTabs',
    childIncludes: ['ElTabPane'],
    title: '标签页',
    groupId: 'el',
    categoryId: 'nav',
    // icon: 'https://alifd.oss-cn-hangzhou.aliyuncs.com/fusion-cool/icons/icon-light/ic_light_button.png',
    package: 'element-plus',
    props: [
      {
        name: 'modelValue',
        defaultValue: '',
        setters: 'InputSetter'
      },
      {
        name: 'mode',
        defaultValue: '',
        setters: 'SelectSetter',
        options: ['card', 'border-card']
      },
      {
        name: 'closable',
        defaultValue: false,
        setters: 'BooleanSetter'
      },
      {
        name: 'addable',
        defaultValue: false,
        setters: 'BooleanSetter'
      },
      {
        name: 'editable',
        defaultValue: false,
        setters: 'BooleanSetter'
      },
      {
        name: 'tabPosition',
        defaultValue: 'top',
        setters: 'SelectSetter',
        options: ['top', 'right', 'bottom', 'left']
      },
      {
        name: 'stretch',
        defaultValue: false,
        setters: 'BooleanSetter'
      },
      {
        name: 'beforeLeave',
        defaultValue: '',
        setters: 'FunctionSetter'
      }
    ],
    events: [
      {
        name: 'tab-click'
      },
      {
        name: 'tab-change'
      },
      {
        name: 'tab-remove'
      },
      {
        name: 'tab-add'
      },
      {
        name: 'edit'
      }
    ],
    snippet: {
      name: 'ElTabs',
      props: {
        modelValue: 'one',
        type: 'border-card'
      },
      children: [
        {
          name: 'ElTabPane',
          children: 'tabOne内容',
          props: {
            label: 'tabOne',
            name: 'one'
          }
        },
        {
          name: 'ElTabPane',
          children: 'tabTwo内容',
          props: {
            label: 'tabTwo',
            name: 'two'
          }
        },
        {
          name: 'ElTabPane',
          children: 'tabThree内容',
          props: {
            label: 'tabThree',
            name: 'three'
          }
        },
      ]
    }
  },
  {
    name: 'ElTabPane',
    childIncludes: false,
    title: '标签页-ElTabPane',
    groupId: 'el',
    categoryId: 'nav',
    // icon: 'https://alifd.oss-cn-hangzhou.aliyuncs.com/fusion-cool/icons/icon-light/ic_light_button.png',
    package: 'element-plus',
    props: [
      {
        name: 'label',
        defaultValue: '',
        setters: 'InputSetter'
      },
      {
        name: 'disabled',
        defaultValue: false,
        setters: 'BooleanSetter'
      },
      {
        name: 'name',
        defaultValue: '',
        setters: 'InputSetter'
      },
      {
        name: 'closable',
        defaultValue: false,
        setters: 'BooleanSetter'
      },
      {
        name: 'lazy',
        defaultValue: false,
        setters: 'BooleanSetter'
      }
    ],
    slots: [
      {
        name: 'default'
      },
      {
        name: 'label'
      }
    ]
  }
];

export default Tabs;
