import snippets from './snippets';
import { IPublicTypeComponentMetadata } from '@alilc/lowcode-types';

/**
 * ToolBar 组件 LowCode Meta 配置
 * @description PisellGridPro 的工具栏子组件
 */
const ToolBarMeta: IPublicTypeComponentMetadata = {
  "componentName": "PisellToolBar",
  "title": "PisellToolBar",
  "docUrl": "",
  "screenshot": "",
  "devMode": "proCode",
  "category": "数据展示",
  "npm": {
    "package": "@pisell/materials",
    "version": "3.3.77",
    "exportName": "PisellToolBar",
    "main": "src/index.tsx",
    "destructuring": true,
    "subName": ""
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'Basic',
            'zh-CN': '基础',
          },
        },
        display: 'block',
        type: 'group',
        items: [
          {
            name: 'className',
            title: {
              label: {
                type: 'i18n',
                'en-US': 'ClassName',
                'zh-CN': '样式类名',
              },
              tip: 'className | 自定义类名',
            },
            propType: 'string',
            setter: 'StringSetter',
          },
          {
            name: 'style',
            title: {
              label: {
                type: 'i18n',
                'en-US': 'Style',
                'zh-CN': '样式',
              },
              tip: 'style | 自定义样式',
            },
            propType: 'object',
            setter: 'StyleSetter',
          },
        ],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'Slots',
            'zh-CN': '插槽配置',
          },
        },
        display: 'block',
        type: 'group',
        items: [
          {
            name: 'tabs',
            title: {
              label: {
                type: 'i18n',
                'en-US': 'Tabs Area',
                'zh-CN': '标签页区域',
              },
              tip: 'tabs | 标签页区域内容，通常用于放置 Tabs 组件',
            },
            propType: {
              type: 'oneOfType',
              value: ['node'],
            },
            setter: [
              {
                componentName: 'SlotSetter',
                title: '标签页插槽',
                initialValue: {
                  type: 'JSSlot',
                  value: [],
                },
              },
            ],
          },
          {
            name: 'topLeft',
            title: {
              label: {
                type: 'i18n',
                'en-US': 'Top Left',
                'zh-CN': '上方左侧',
              },
              tip: 'topLeft | 上方左侧区域内容，通常用于放置操作按钮',
            },
            propType: {
              type: 'oneOfType',
              value: ['node'],
            },
            setter: [
              {
                componentName: 'SlotSetter',
                title: '上左插槽',
                initialValue: {
                  type: 'JSSlot',
                  value: [],
                },
              },
            ],
          },
          {
            name: 'topRight',
            title: {
              label: {
                type: 'i18n',
                'en-US': 'Top Right',
                'zh-CN': '上方右侧',
              },
              tip: 'topRight | 上方右侧区域内容，通常用于放置搜索、设置等功能',
            },
            propType: {
              type: 'oneOfType',
              value: ['node'],
            },
            setter: [
              {
                componentName: 'SlotSetter',
                title: '上右插槽',
                initialValue: {
                  type: 'JSSlot',
                  value: [],
                },
              },
            ],
          },
          {
            name: 'bottomLeft',
            title: {
              label: {
                type: 'i18n',
                'en-US': 'Bottom Left',
                'zh-CN': '下方左侧',
              },
              tip: 'bottomLeft | 下方左侧区域内容，通常用于放置筛选器',
            },
            propType: {
              type: 'oneOfType',
              value: ['node'],
            },
            setter: [
              {
                componentName: 'SlotSetter',
                title: '下左插槽',
                initialValue: {
                  type: 'JSSlot',
                  value: [],
                },
              },
            ],
          },
          {
            name: 'bottomRight',
            title: {
              label: {
                type: 'i18n',
                'en-US': 'Bottom Right',
                'zh-CN': '下方右侧',
              },
              tip: 'bottomRight | 下方右侧区域内容，通常用于放置高级筛选、重置等功能',
            },
            propType: {
              type: 'oneOfType',
              value: ['node'],
            },
            setter: [
              {
                componentName: 'SlotSetter',
                title: '下右插槽',
                initialValue: {
                  type: 'JSSlot',
                  value: [],
                },
              },
            ],
          },
        ],
      },
    ],
    supports: {
      style: true,
      className: true,
    },
    component: {
      isContainer: true,
      nestingRule: {
        parentWhitelist: ['PisellGridPro', 'Div', 'Container', 'Page'],
      },
    },
  },
};

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