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

const PisellStatisticListMeta: ComponentMetadata = {
  componentName: 'PisellStatisticList',
  title: 'PisellStatisticList',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/materials',
    version: '3.0.48',
    exportName: 'PisellStatisticList',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'backgroundColors',
            'zh-CN': 'backgroundColors',
          },
        },
        name: 'backgroundColors',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'ArraySetter',
                props: {
                  itemSetter: {
                    componentName: 'StringSetter',
                    isRequired: false,
                    initialValue: '',
                  },
                },
                initialValue: [],
              },
            ],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'labelColor',
            'zh-CN': 'labelColor',
          },
        },
        name: 'labelColor',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'StringSetter',
                isRequired: false,
                initialValue: '',
              },
            ],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'valueColor',
            'zh-CN': 'valueColor',
          },
        },
        name: 'valueColor',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'StringSetter',
                isRequired: false,
                initialValue: '',
              },
            ],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'data',
            'zh-CN': 'data',
          },
        },
        name: 'data',
        setter: {
          componentName: 'ArraySetter',
          props: {
            itemSetter: {
              componentName: 'ObjectSetter',
              props: {
                config: {
                  items: [
                    {
                      title: {
                        label: {
                          type: 'i18n',
                          'en-US': 'label',
                          'zh-CN': 'label',
                        },
                      },
                      name: 'label',
                      setter: {
                        componentName: 'StringSetter',
                        isRequired: true,
                        initialValue: '',
                      },
                    },
                    {
                      title: {
                        label: {
                          type: 'i18n',
                          'en-US': 'value',
                          'zh-CN': 'value',
                        },
                      },
                      name: 'value',
                      setter: {
                        componentName: 'StringSetter',
                        isRequired: true,
                        initialValue: '',
                      },
                    },
                    {
                      title: {
                        label: 'tip',
                      },
                      name: 'tip',
                      setter: {
                        componentName: 'StringSetter',
                        initialValue: '',
                      },
                    },
                    {
                      title: {
                        label: {
                          type: 'i18n',
                          'en-US': 'children',
                          'zh-CN': 'children',
                        },
                      },
                      name: 'children',
                      setter: {
                        componentName: 'MixedSetter',
                        props: {
                          setters: [
                            {
                              componentName: 'ObjectSetter',
                              props: {
                                config: {
                                  extraSetter: {
                                    componentName: 'MixedSetter',
                                    isRequired: false,
                                    props: {},
                                  },
                                },
                              },
                              isRequired: false,
                              initialValue: {},
                            },
                            {
                              componentName: 'ArraySetter',
                              props: {
                                itemSetter: {
                                  componentName: 'ObjectSetter',
                                  props: {
                                    config: {
                                      items: [
                                        {
                                          title: {
                                            label: {
                                              type: 'i18n',
                                              'en-US': 'label',
                                              'zh-CN': 'label',
                                            },
                                          },
                                          name: 'label',
                                          setter: {
                                            componentName: 'StringSetter',
                                            isRequired: true,
                                            initialValue: '',
                                          },
                                        },
                                        {
                                          title: {
                                            label: {
                                              type: 'i18n',
                                              'en-US': 'value',
                                              'zh-CN': 'value',
                                            },
                                          },
                                          name: 'value',
                                          setter: {
                                            componentName: 'StringSetter',
                                            isRequired: true,
                                            initialValue: '',
                                          },
                                        },
                                      ],
                                      extraSetter: {
                                        componentName: 'MixedSetter',
                                        isRequired: false,
                                        props: {},
                                      },
                                    },
                                  },
                                },
                              },
                              initialValue: [],
                            },
                          ],
                        },
                      },
                    },
                  ],
                  extraSetter: {
                    componentName: 'MixedSetter',
                    isRequired: false,
                    props: {},
                  },
                },
              },
            },
          },
          isRequired: true,
          initialValue: [],
        },
      },
    ],
    supports: {
      style: true,
    },
    component: {},
  },
};
const snippets: Snippet[] = [
  {
    title: 'PisellStatisticList',
    screenshot: '',
    schema: {
      componentName: 'PisellStatisticList',
      props: {},
    },
  },
];

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