import snippets from './snippets';

export default {
  snippets,
  componentName: 'PisellSectionHeaders',
  title: '顶部内容区块',
  category: '数据展示',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/materials',
    version: '1.0.1',
    exportName: 'PisellSectionHeaders',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  props: [
    // {
    //   title: '基础',
    //   display: 'block',
    //   type: 'group',
    //   items: [
    //     {
    //       name: 'background',
    //       title: { label: '背景色', tip: 'background | 背景色' },
    //       propType: 'string',
    //       setter: 'ColorSetter',
    //     },
    //   ],
    // },
    {
      name: 'backNode',
      title: { label: '返回区域', tip: 'backNode | 返回区域' },
      propType: 'node',
      setter: {
        componentName: 'SlotSetter',
        initialValue: {
          type: 'JSSlot',
          value: [],
        },
      },

    },
    {
      name: 'centerNode',
      title: { label: '中间区域', tip: 'centerNode | 中间区域' },
      propType: 'node',
      setter: {
        componentName: 'SlotSetter',
        initialValue: {
          type: 'JSSlot',
          value: [],
        },
      },
    },
    {
      name: 'actionNode',
      title: { label: '操作区域', tip: 'actionNode | 操作区域' },
      propType: 'node',
      setter: {
        componentName: 'SlotSetter',
        initialValue: {
          type: 'JSSlot',
          value: [],
        },
      },
    },
  ],
  configure: {
    component: {
      isContainer: true,
    },
    supports: {
      style: true,
      events: [
        {
          name: 'onBack',
          template:
            "onBack(value,${extParams}){\n// 返回事件的回调\nconsole.log('onBack',value);}",
        },
        {
          name: 'onAction',
          template:
            "onAction(value,${extParams}){\n// 右侧操作事件的回调\nconsole.log('onAction',value);}",
        },
      ],
    },
  },
};
