import React, { memo } from 'react';
import { Login2 } from "../../../../pro/Login2.0";
import "./index.less";

/**
 * LoginPanel 组件 Props
 */

/**
 * LoginPanel 登录面板组件
 * @description 登录表单容器，由用户自行实现具体登录逻辑
 */
var LoginPanel = /*#__PURE__*/memo(function (props) {
  var _props$className = props.className,
    className = _props$className === void 0 ? '' : _props$className,
    onLoginSuccess = props.onLoginSuccess,
    config = props.config;
  return /*#__PURE__*/React.createElement("div", {
    className: "login-panel ".concat(className).trim()
  }, /*#__PURE__*/React.createElement(Login2, {
    config: config || {
      loginMethods: [{
        type: 'email',
        verificationMethods: ['password']
      }],
      ui: {
        title: {
          show: false,
          text: 'Welcome back',
          align: 'center'
        },
        subtitle: {
          show: false,
          text: 'Log in to your account',
          align: 'center'
        },
        desc: {
          show: false,
          text: 'Welcome back! Please enter your details.',
          align: 'center'
        },
        themeColor: '#7F56D9',
        logo: {
          show: false
        },
        formLabels: {
          email: {
            show: true
          },
          phone: {
            show: true
          },
          password: {
            show: true
          },
          verificationCode: {
            show: true
          }
        }
      },
      legalTerms: {
        enabled: false
      },
      emailLinkVerification: {
        enabled: false,
        code: ''
      }
    },
    onLogin: onLoginSuccess
  }));
});
LoginPanel.displayName = 'LoginPanel';
export default LoginPanel;