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

const ShoppingCartMeta: ComponentMetadata = {
  componentName: 'ShoppingCart',
  title: 'ShoppingCart',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.4',
    exportName: 'ShoppingCart',
    main: 'src/index.ts',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': '卡片样式',
            'zh-CN': '卡片样式',
          },
        },
        name: 'platform',
        propType: {
          type: "oneOf",
          value: ["shop", "h5"],
        },
        setter: [
          {
            componentName: "RadioGroupSetter",
            props: {
              options: [
                {
                  title: "管理端",
                  value: "shop",
                },
                {
                  title: "用户端",
                  value: "h5",
                },
              ],
            },
          },
          "VariableSetter",
        ],
        defaultValue: "shop",
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': '空数据提示',
            'zh-CN': '空数据提示',
          },
        },
        name: 'emptyText',
        setter: "StringSetter",
        defaultValue: "No services selected",
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': '是否开启分组',
            'zh-CN': '是否开启分组',
          },
        },
        name: 'isOpenGroup',
        setter: "BoolSetter",
        defaultValue: true,
      },
    ],
    supports: {
      style: true,
      events: [],
    },
    component: {},
  },
};
const snippets: Snippet[] = [
  {
    title: 'ShoppingCart',
    screenshot: '',
    schema: {
      componentName: 'ShoppingCart',
      props: {},
    },
  },
];

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