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


const AuthMethodsMeta: ComponentMetadata = {
  componentName: 'AuthMethods',
  title: 'AuthMethods',
  docUrl: '',
  screenshot: '',
  category: '表单',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.0',
    exportName: 'AuthMethods',
    main: 'src/index.ts',
    destructuring: true,
    subName: '',
  },
  props: [],
  configure: {
    props: [
      {
        title: {
          label: 'RegisterHeader',
        },
        type: 'group',
        display: 'block',
        items: [
          {
            name: 'showLogo',
            title: { label: '显示Logo' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'logo',
            title: { label: 'Logo图片' },
            propType: 'string',
            setter: 'ImageSetter',
          },
          {
            name: 'logoPosition',
            title: { label: 'Logo位置' },
            setter: {
              componentName: 'RadioGroupSetter',
              props: {
                options: [
                  { label: '居左', value: 'left' },
                  { label: '居中', value: 'center' },
                  { label: '居右', value: 'right' },
                ],
              },
            },
            defaultValue: 'center',
          },
          {
            name: 'logoSize',
            title: { label: 'Logo尺寸' },
            propType: 'object',
            display: 'inline',
            setter: {
              componentName: 'ObjectSetter',
              props: {
                config: {
                  items: [
                    {
                      name: 'width',
                      title: '宽度',
                      setter: 'NumberSetter',
                    },
                    {
                      name: 'height',
                      title: '高度',
                      setter: 'NumberSetter',
                    },
                  ],
                },
              },
            },
          },
        ],
      },
      {
        title: {
          label: '欢迎语',
        },
        type: 'group',
        display: 'block',
        items: [
          {
            name: 'showWelcomeMessage',
            title: { label: '显示欢迎语' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'welcomeMessage',
            title: { label: '欢迎语文案' },
            propType: 'string',
            setter: 'PisellI18nSetter',
          },
          {
            name: 'welcomeMessageAlign',
            title: { label: '位置' },
            setter: {
              componentName: 'RadioGroupSetter',
              props: {
                options: [
                  { label: '居左', value: 'left' },
                  { label: '居中', value: 'center' },
                  { label: '居右', value: 'right' },
                ],
              },
            },
          },
        ],
      },
      {
        title: {
          label: '标题',
        },
        type: 'group',
        display: 'block',
        items: [
          {
            name: 'showTitle',
            title: { label: '显示标题' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'title',
            title: { label: '标题文案' },
            propType: 'string',
            setter: 'PisellI18nSetter',
          },
          {
            name: 'titleAlign',
            title: { label: '位置' },
            setter: {
              componentName: 'RadioGroupSetter',
              props: {
                options: [
                  { label: '居左', value: 'left' },
                  { label: '居中', value: 'center' },
                  { label: '居右', value: 'right' },
                ],
              },
            },
          },
        ],
      },
      {
        title: {
          label: '副标题',
        },
        type: 'group',
        display: 'block',
        items: [
          {
            name: 'showSubtitle',
            title: { label: '显示副标题' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'subtitle',
            title: { label: '副标题文案' },
            propType: {
              type: 'oneOfType',
              value: ['node', 'string'],
            },
            setter: 'PisellI18nSetter',
          },
          {
            name: 'subtitleAlign',
            title: { label: '位置' },
            setter: {
              componentName: 'RadioGroupSetter',
              props: {
                options: [
                  { label: '居左', value: 'left' },
                  { label: '居中', value: 'center' },
                  { label: '居右', value: 'right' },
                ],
              },
            },
          },
        ],
      },
      {
        title: {
          label: '邮箱注册',
        },
        type: 'group',
        display: 'block',
        items: [
          {
            name: 'emailLabel',
            title: { label: '邮箱标题' },
            propType: {
              type: 'oneOfType',
              value: ['node', 'string'],
            },
            setter: 'PisellI18nSetter',
          },
          {
            name: 'emailPlaceholder',
            title: { label: '邮箱输入提示' },
            propType: {
              type: 'oneOfType',
              value: ['node', 'string'],
            },
            setter: 'PisellI18nSetter',
          },
          {
            name: 'passwordLabel',
            title: { label: '密码标题' },
            propType: {
              type: 'oneOfType',
              value: ['node', 'string'],
            },
            setter: 'PisellI18nSetter',
          },
          {
            name: 'passwordPlaceholder',
            title: { label: '密码输入提示' },
            propType: {
              type: 'oneOfType',
              value: ['node', 'string'],
            },
            setter: 'PisellI18nSetter',
          },
          {
            name: 'showDivider',
            title: { label: '显示分界线' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'dividerText',
            title: { label: '分界线文案' },
            propType: {
              type: 'oneOfType',
              value: ['string', 'object'],
            },
            setter: {
              componentName: 'PisellI18nSetter',
            },
          },
          {
            name: 'showFirstName',
            title: { label: '显示名' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'showLastName',
            title: { label: '显示姓' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'buttonText',
            title: { label: '按钮文本' },
            propType: {
              type: 'oneOfType',
              value: ['node', 'string'],
            },
            setter: 'PisellI18nSetter',
          },
        ],
      },
      {
        title: {
          label: '登录入口',
        },
        type: 'group',
        display: 'block',
        items: [
          {
            name: 'showLogin',
            title: { label: '显示登录入口' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'loginAlign',
            title: { label: '位置' },
            setter: {
              componentName: 'RadioGroupSetter',
              props: {
                options: [
                  { label: '居左', value: 'left' },
                  { label: '居中', value: 'center' },
                  { label: '居右', value: 'right' },
                ],
              },
            },
          },
          {
            name: 'showLoginText',
            title: { label: '显示标题' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'loginText',
            title: { label: '标题' },
            propType: {
              type: 'oneOfType',
              value: ['string', 'object'],
            },
            setter: {
              componentName: 'PisellI18nSetter',
            },
          },
          {
            name: 'showLoginLinkText',
            title: { label: '显示文本按钮' },
            propType: 'bool',
            defaultValue: true,
            setter: 'BoolSetter',
          },
          {
            name: 'loginLinkText',
            title: { label: '文本按钮文案' },
            propType: {
              type: 'oneOfType',
              value: ['string', 'object'],
            },
            setter: {
              componentName: 'PisellI18nSetter',
            },
          },
        ],
      },
    ],
    supports: {
      style: true,
      events: [
        {
          name: 'onVerifyEmail',
          description: '输入邮箱点击按钮回调',
        },
        {
          name: 'onSendEmail',
          description: '重新发送验证邮件回调',
        },
        {
          name: 'onVerifyLink',
          description: '验证链接回调',
        },
        {
          name: 'onEntryInfo',
          description: '信息录入后点击按钮回调',
        },
        {
          name: 'onGoLogin',
          description: '点击去登录按钮回调',
        },
        {
          name: 'onStepChange',
          description: '注册步骤变化回调',
        },
      ],
    },
    component: {
      isContainer: false,
    },
  },
};

export default {
  ...AuthMethodsMeta,
};
