import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';

const ContactInfoModalMeta: ComponentMetadata = {
  componentName: 'ContactInfoModal',
  title: '联系信息弹窗',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.0',
    exportName: 'ContactInfoModal',
    main: 'src/index.ts',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'open',
            'zh-CN': '打开',
          },
        },
        name: 'open',
        setter: ['BoolSetter', 'VariableSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'dataSource',
            'zh-CN': '数据源',
          },
        },
        name: 'dataSource',
        setter: ['JsonSetter', 'VariableSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'isShowDelete',
            'zh-CN': '是否展示删除按钮',
          },
        },
        name: 'isShowDelete',
        setter: ['BoolSetter', 'VariableSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'config',
            'zh-CN': '配置项',
          },
        },
        name: 'config',
        setter: ['JsonSetter', 'VariableSetter'],
      },
    ],
    supports: {
      events: [
        {
          name: 'onSave',
          description: '保存联系信息点击事件',
        },
        {
          name: 'onDelete',
          description: '删除联系信息点击事件',
        },
        {
          name: 'onCancel',
          description: '取消点击事件',
        },
      ],
      style: true,
    },
    component: {},
  },
};
const snippets: Snippet[] = [
  {
    title: 'ContactInfoModal',
    screenshot: '',
    schema: {
      componentName: 'ContactInfoModal',
      props: {},
    },
  },
];

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