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

const EventCardMeta: IPublicTypeComponentMetadata = {
  componentName: 'EventCard',
  title: '活动详情',
  category: '数据展示',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.4',
    exportName: 'EventCard',
    main: 'src/index.ts',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        name: 'showTitle',
        title: { label: '显示标题', tip: 'showTitle | 显示标题' },
        setter: 'BoolSetter',
      },
      {
        name: 'showSubtitle',
        title: { label: '显示副标题', tip: 'showSubtitle | 显示副标题' },
        setter: 'BoolSetter',
      },
      {
        name: 'showDescription',
        title: { label: '显示描述', tip: 'showDescription | 显示描述' },
        setter: 'BoolSetter',
      },
      {
        name: 'showPrice',
        title: { label: '显示价格', tip: 'showPrice | 显示价格' },
        setter: 'BoolSetter',
      },
      {
        name: 'showOriginalPrice',
        title: { label: '显示原价', tip: 'showOriginalPrice | 显示原价' },
        setter: 'BoolSetter',
      },
    ],
    supports: {
      style: true,
    },
  },
};

const snippets: IPublicTypeSnippet[] = [
  {
    title: '活动详情',
    screenshot: '',
    schema: {
      componentName: 'EventCard',
      props: {
        // title: 'Event name',
        // subtitle: 'Subtitle',
        // description: 'Launch your career as a front-end developer. Build job-ready skills for an in-demand career and earn a credential from Meta. No degree or prior experience required to get started.',
        // price: 90.00,
        // originalPrice: 99.00,
        showTitle: true,
        showSubtitle: true,
        showDescription: true,
        showPrice: true,
        showOriginalPrice: true,
      },
    },
  },
];

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