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

const BookingDashboardMeta: ComponentMetadata = {
  componentName: 'BookingDashboard',
  title: 'BookingDashboard',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.4',
    exportName: 'BookingDashboard',
    main: 'src/index.ts',
    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': 'otherParams',
            'zh-CN': 'otherParams',
          },
        },
        name: 'otherParams',
        setter: ["JsonSetter","VariableSetter"],
      },
      {
        title: {
          label: 'refreshKey',
        },
        name: 'refreshKey',
        setter: ["StringSetter","VariableSetter"],
      },
    ],
    supports: {
      style: true,
      events: [
        {
          name: "onDataChange",
          template:
            "onDataChange(data,dataList,${extParams}){\n//console.log('onDataChange',data,dataList);}",
        },
      ],
    },
    component: {},
  },
};
const snippets: Snippet[] = [
  {
    title: 'BookingDashboard',
    screenshot: '',
    schema: {
      componentName: 'BookingDashboard',
      props: {},
    },
  },
];

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