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

const ReservationStatisticMeta: IPublicTypeComponentMetadata = {
  componentName: 'ReservationStatistic',
  title: '预约统计',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.4',
    exportName: 'ReservationStatistic',
    main: 'src/index.ts',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'dataSource',
            'zh-CN': '数据源',
          },
        },
        name: 'dataSource',
        setter: 'JsonSetter',
      },

      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'className',
            'zh-CN': '类名',
          },
        },
        name: 'className',
        setter: 'StringSetter',
      },
    ],
    supports: {
      style: true,
      className: true,
    },
    component: {
      isContainer: false,
    },
  },
};

const snippets: IPublicTypeSnippet[] = [
  {
    title: '预约统计',
    screenshot: '',
    schema: {
      componentName: 'ReservationStatistic',
      props: {
        dataSource: [
          { label: 'Total Bookings', value: '128' },
          { label: 'Upcoming', value: '24' },
          { label: 'Ongoing', value: '16' },
          { label: 'Ending Soon', value: '8' },
          { label: 'Completed', value: '52' },
          { label: 'New Today', value: '18' },
          { label: 'Amount Collected', value: '$5,860.00' },
        ],
      },
    },
  },
];

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