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

import props from './props'

const snippets: IPublicTypeSnippet[] = [
  {
    title: '手风琴选择器',
    schema: {
      componentName: 'CollapseSelector',
      props: {},
      children: [
        {
          componentName: 'CollapseSelectorItem',
          props: {
            title: '选择项1',
            key: 'collapse-selector-item-1',
          },
        },
        {
          componentName: 'CollapseSelectorItem',
          props: {
            title: '选择项2',
            key: 'collapse-selector-item-2',
          },
        },
      ],
    },
  },
]

const CollapseSelectorMeta: IPublicTypeComponentMetadata = {
  group: '低代码组件',
  componentName: 'CollapseSelector',
  title: '手风琴选择器',
  category: '布局容器类',
  docUrl: '',
  screenshot:
    'https://img.alicdn.com/imgextra/i4/O1CN01mh9LPG268B90t8DaA_!!6000000007616-55-tps-56-56.svg',
  devMode: 'proCode',
  npm: {
    package: '@dckj-npm/dc-material',
    version: '0.1.130',
    exportName: 'CollapseSelector',
    main: 'src\\index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    component: {
      isContainer: true,
      nestingRule: {
        childWhitelist: ['CollapseSelectorItem'],
      },
      disableBehaviors: ['copy'],
    },
    props,
    supports: {
      style: true,
    },
  },
  snippets,
}

export default {
  ...CollapseSelectorMeta,
  snippets,
}
