/*
Copyright (C) 2025 QuantumNous

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

For commercial licensing, please contact support@quantumnous.com
*/

import React from 'react';
import { Typography } from '@douyinfe/semi-ui';
import { useTranslation } from 'react-i18next';
import {
  Moonshot,
  OpenAI,
  XAI,
  Zhipu,
  Volcengine,
  Cohere,
  Claude,
  Gemini,
  Suno,
  Minimax,
  Wenxin,
  Spark,
  Qingyan,
  DeepSeek,
  Qwen,
  Midjourney,
  Grok,
  AzureAI,
  Hunyuan,
  Xinference,
} from '@lobehub/icons';

const { Title, Text } = Typography;

const PartnersSection = () => {
  const { t } = useTranslation();

  const partners = [
    { icon: Moonshot, name: 'Moonshot AI', size: 40 },
    { icon: OpenAI, name: 'OpenAI', size: 40 },
    { icon: XAI, name: 'Grok', size: 40 },
    { icon: Zhipu, name: t('智谱'), size: 40 },
    { icon: Volcengine, name: t('火山引擎'), size: 40 },
    { icon: Cohere, name: 'Cohere', size: 40 },
    { icon: Claude, name: 'Claude', size: 40 },
    { icon: Gemini, name: 'Gemini', size: 40 },
    { icon: Suno, name: 'Suno', size: 40 },
    { icon: Minimax, name: 'Minimax', size: 40 },
    { icon: Wenxin, name: t('文心'), size: 40 },
    { icon: Spark, name: t('讯飞星火'), size: 40 },
    { icon: Qingyan, name: t('腾讯混元'), size: 40 },
    { icon: DeepSeek, name: 'DeepSeek', size: 40 },
    { icon: Qwen, name: t('通义千问'), size: 40 },
    { icon: Midjourney, name: 'Midjourney', size: 40 },
    { icon: Grok, name: 'Grok', size: 40 },
    { icon: AzureAI, name: 'Azure AI', size: 40 },
    { icon: Hunyuan, name: t('腾讯混元'), size: 40 },
    { icon: Xinference, name: 'Xinference', size: 40 },
  ];

  return (
    <section className="home-snap-section bg-[var(--semi-color-bg-0)]">
      <div className="mx-auto w-full max-w-6xl px-5 py-16 md:px-6 lg:px-8">
        {/* 标题区域 */}
        <div className="text-center">
          <Text className="text-sm font-bold uppercase tracking-widest text-semi-color-text-2">
            {t('生态伙伴')}
          </Text>
          <Title heading={2} className="mt-3 text-3xl font-semibold md:text-4xl">
            {t('与主流模型供应商深度对接')}
          </Title>
          <p className="mt-4 text-base leading-relaxed text-semi-color-text-1">
            {t('保持统一协议，快速切换与扩展模型能力，随时接入最新生态。')}
          </p>
        </div>

        {/* Logo 网格 */}
        <div className="partner-logo-container mt-10">
          {partners.map((Partner, index) => {
            const IconComponent = Partner.icon;
            return (
              <div
                key={index}
                className={`partner-logo partner-logo-animated`}
                title={Partner.name}
              >
                <IconComponent size={Partner.size} />
              </div>
            );
          })}
        </div>
      </div>
    </section>
  );
};

export default PartnersSection;
