const ButtonMeta = {
  componentName: 'Button',
  title: '按钮',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  group: '基础组件',
  category: '基础元素',
  npm: {
    package: 'kernelsoft-lowcode-material',
    version: '0.1.0',
    exportName: 'Button',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        name: 'children',
        title: {
          label: {
            type: 'i18n',
            zh_CN: '按钮内容',
            en_US: 'Content',
          },
          tip: {
            type: 'i18n',
            zh_CN: '属性: children | 说明: 按钮文本',
            en_US: 'prop: children | description: button content',
          },
        },
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: ['StringSetter', 'ExpressionSetter'],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'color',
            'zh-CN': '颜色',
          },
        },
        name: 'color',
        setter: {
          componentName: 'ColorSetter',
          isRequired: true,
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'shape',
            'zh-CN': '形状',
          },
        },
        name: 'shape',
        setter: {
          componentName: 'RadioGroupSetter',
          props: {
            dataSource: [
              {
                label: '方形',
                value: 'square',
              },
              {
                label: '圆形',
                value: 'round',
              },
            ],
            options: [
              {
                label: '方形',
                value: 'square',
              },
              {
                label: '圆形',
                value: 'round',
              },
            ],
          },
          isRequired: true,
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'plain',
            'zh-CN': '朴素按钮',
          },
        },
        name: 'plain',
        setter: {
          componentName: 'BoolSetter',
          isRequired: true,
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'loading',
            'zh-CN': '加载状态',
          },
        },
        name: 'loading',
        setter: {
          componentName: 'BoolSetter',
          isRequired: true,
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'disabled',
            'zh-CN': '禁用',
          },
        },
        name: 'disabled',
        setter: {
          componentName: 'BoolSetter',
          isRequired: true,
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'type',
            'zh-CN': '类型',
          },
        },
        name: 'type',
        setter: {
          componentName: 'SelectSetter',
          props: {
            dataSource: [
              {
                label: 'primary',
                value: 'primary',
              },
              {
                label: 'default',
                value: 'default',
              },
              {
                label: 'info',
                value: 'info',
              },
              {
                label: 'success',
                value: 'success',
              },
              {
                label: 'warning',
                value: 'warning',
              },
              {
                label: 'danger',
                value: 'danger',
              },
            ],
            options: [
              {
                label: 'primary',
                value: 'primary',
              },
              {
                label: 'default',
                value: 'default',
              },
              {
                label: 'info',
                value: 'info',
              },
              {
                label: 'success',
                value: 'success',
              },
              {
                label: 'warning',
                value: 'warning',
              },
              {
                label: 'danger',
                value: 'danger',
              },
            ],
          },
          isRequired: true,
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'size',
            'zh-CN': '大小',
          },
        },
        name: 'size',
        setter: {
          componentName: 'RadioGroupSetter',
          props: {
            dataSource: [
              {
                label: '小',
                value: 'small',
              },
              {
                label: '正常',
                value: 'normal',
              },
              {
                label: '大',
                value: 'large',
              },
            ],
            options: [
              {
                label: '小',
                value: 'small',
              },
              {
                label: '正常',
                value: 'normal',
              },
              {
                label: '大',
                value: 'large',
              },
            ],
          },
          isRequired: true,
        },
      },
    ],
    supports: {
      style: true,
      events: [
        {
          name: 'onClick',
          propType: 'func',
          description: '点击按钮的回调\n@param {Object} e Event Object',
        },
      ],
    },
    component: {},
  },
};
const snippets = [
  {
    title: '按钮',
    screenshot: require('../icons/button.svg'),
    schema: {
      componentName: 'Button',
      props: {
        children: '按钮',
        shape: 'square',
        plain: false,
        loading: false,
        disabled: false,
        type: 'primary',
        size: 'normal',
        block: false,
        icon: '',
      },
    },
  },
];

export default {
  ...ButtonMeta,
  snippets,
};
