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

const ImageMeta: IPublicTypeComponentMetadata = {
  group: '低代码组件',
  componentName: 'Image',
  title: '图片',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  category: '基础元素',
  npm: {
    package: '@dckj-npm/dc-material',
    version: '0.1.0',
    exportName: 'Image',
    main: 'src\\index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    component: {
      isContainer: true,
      disableBehaviors: ['copy'],
    },
    props: [
      {
        title: '图片地址',
        name: 'imgSrc',
        setter: {
          componentName: 'StringSetter',
          isRequired: true,
          initialValue: '',
        },
      },
    ],
    supports: {
      style: true,
      events: [
        {
          name: 'onClick',
        },
      ],
    },
  },
}

const snippets: IPublicTypeSnippet[] = [
  {
    title: '图片',
    screenshot: '',
    schema: {
      componentName: 'Image',
      props: {
        imgSrc: '',
      },
    },
  },
]

export default {
  ...ImageMeta,
  snippets,
}
