import React from 'react'
import { Space, Typography } from 'antd'
import { ThunderboltOutlined } from '@ant-design/icons'

const { Text, Title } = Typography

interface CompanyLogoProps {
  showText?: boolean
  size?: 'small' | 'medium' | 'large'
}

const CompanyLogo: React.FC<CompanyLogoProps> = ({ showText = true, size = 'medium' }) => {
  const sizeMap = {
    small: { fontSize: 14, iconSize: 20 },
    medium: { fontSize: 16, iconSize: 28 },
    large: { fontSize: 20, iconSize: 36 }
  }

  const { fontSize, iconSize } = sizeMap[size]

  return (
    <Space align="center" style={{ cursor: 'pointer' }}>
      {/* 图标 */}
      <ThunderboltOutlined 
        style={{ 
          fontSize: iconSize, 
          color: '#1890ff',
          fontWeight: 'bold'
        }} 
      />
      
      {/* 公司名称 */}
      {showText && (
        <div>
          <Title 
            level={5} 
            style={{ 
              margin: 0, 
              fontSize: fontSize,
              color: '#262626',
              fontWeight: 600
            }}
          >
            轻远电力老挝ERP
          </Title>
          <Text 
            type="secondary" 
            style={{ 
              fontSize: fontSize - 4,
              display: 'block',
              marginTop: -2
            }}
          >
            Qingyuan Power Laos
          </Text>
        </div>
      )}
    </Space>
  )
}

export default CompanyLogo
