/* eslint-disable @typescript-eslint/no-unused-vars */
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';

const ImageMeta: IPublicTypeComponentMetadata = {
  componentName: 'Image',
  title: '图片',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  group: '基础组件',
  category: '基础元素',
  npm: {
    package: 'kernelsoft-lowcode-material',
    version: '0.1.0',
    exportName: 'Image',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'src',
            'zh-CN': '图片路径',
          },
        },
        name: 'src',
        setter: {
          componentName: 'StringSetter',
          isRequired: true,
          initialValue: '',
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'alt',
            'zh-CN': '代替文本',
          },
        },
        name: 'alt',
        setter: {
          componentName: 'StringSetter',
          isRequired: true,
          initialValue: '',
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'title',
            'zh-CN': '标题',
          },
        },
        name: 'title',
        setter: {
          componentName: 'StringSetter',
          isRequired: true,
        },
      },
    ],
    supports: {
      style: true,
    },
    component: {},
  },
};
const snippets: IPublicTypeSnippet[] = [
  {
    title: '图片',
    screenshot: require('../icons/image.svg'),
    schema: {
      componentName: 'Image',
      props: {
        alt: '图片加载失败',
      },
    },
  },
];

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