import * as React from 'react';
import { AppCard } from '@/components/common';
import './style.scss';

const OtherAppsList: React.FC = () => {
    const apps = [
        {
            id: 'other001',
            name: '传统 OA 系统',
            description: '企业办公自动化系统，支持流程审批、文档管理等功能。',
            icon: 'solar:office-bold-duotone',
            iconBgColor: 'blue' as const,
            tags: [
                { label: 'OA', color: 'slate' as const },
                { label: '办公', color: 'blue' as const },
            ],
            certification: '企业级认证',
        },
        {
            id: 'other002',
            name: '财务管理系统',
            description: '企业财务管理、报表生成、预算控制等一体化解决方案。',
            icon: 'solar:calculator-bold-duotone',
            iconBgColor: 'green' as const,
            tags: [
                { label: '财务', color: 'slate' as const },
                { label: '管理', color: 'green' as const },
            ],
            certification: '安全认证',
        },
    ];

    const handlePlay = (appId: string) => {
        console.log('播放应用:', appId);
    };

    const handleShare = (appId: string) => {
        console.log('分享应用:', appId);
    };

    const handleFavorite = (appId: string) => {
        console.log('收藏应用:', appId);
    };

    return (
        <div className='app-plaza-list'>
            {/* List Header - 使用全局样式 */}
            <div className='list-header'>
                <div className='list-header-title'>
                    <h3>其他非 RAG 应用</h3>
                    <p>传统企业应用和系统</p>
                </div>
            </div>

            <div className='app-card-grid'>
                {apps.map((app) => (
                    <AppCard
                        key={app.id}
                        {...app}
                        onPlay={() => handlePlay(app.id)}
                        onShare={() => handleShare(app.id)}
                        onFavorite={() => handleFavorite(app.id)}
                    />
                ))}
            </div>
        </div>
    );
};

export default OtherAppsList;
