import React from 'react';
import styles from './styles.less';
import classnames from 'classnames';

const AminerSkin = (props: any) => {
  const { children, showTitle, style, className, ...restProps } = props;
  return (
    <>
      {showTitle && (
        <h1 className={styles.title} style={{ ...(style || {}) }}>
          {restProps?.locale === 'zh-CN' ? (
            <>
              登录AMiner，与全球<b>1.3亿</b>学者一起交流学术！
            </>
          ) : (
            <>
              Login to AMiner, Connect with <b>130 million</b> scholars
              worldwide!
            </>
          )}
        </h1>
      )}
      <div className={classnames(styles.content, className)}>
        {React.cloneElement(children, { ...restProps })}
      </div>
    </>
  );
};

export default AminerSkin;
