import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'

const Button2Meta: IPublicTypeComponentMetadata = {
  componentName: 'Button2',
  group: '低代码组件',
  title: '按钮',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  category: '基础元素',
  npm: {
    package: '@dckj-npm/dc-material',
    version: '0.1.13',
    exportName: 'Button2',
    main: 'src\\index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'name',
            'zh-CN': '标签名称',
          },
          tip: 'name | 标签名称',
        },
        name: 'name',
        description: '标签名称',
        setter: {
          componentName: 'StringSetter',
          isRequired: true,
          initialValue: '',
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'color',
            'zh-CN': '标签颜色',
          },
          tip: 'color | 标签颜色',
        },
        name: 'color',
        description: '标签颜色',
        setter: {
          componentName: 'ColorSetter',
          isRequired: true,
          initialValue: '#222222',
        },
      },
    ],
    supports: {
      style: true,
      events: [
        {
          name: 'onClick',
        },
      ],
    },
    component: {
      disableBehaviors: ['copy'],
    },
  },
}
const snippets: IPublicTypeSnippet[] = [
  {
    title: '按钮',
    screenshot: '',
    schema: {
      componentName: 'Button2',
      props: {
        name: '按钮',
        color: '#222222',
      },
    },
  },
]

export default {
  ...Button2Meta,
  snippets,
}
