export default defineEventHandler(async (event) => {
  // 获取查询参数中的语言设置
  const query = getQuery(event);
  const lang = query.lang || 'ja'; // 默认使用日语
  
  // 模拟数据
  const mockData = {
    code: 200,
    message: "success",
    data: [
      {
        id: 1,
        title: lang === 'zh' ? "PC高速化" : "PC高速化",
        description: lang === 'zh' ? "2.5寸SSD和M.2 SSD" : "2.5-inch SSD & M.2 SSD",
        features: [
          lang === 'zh' ? "电脑加速" : "PC高速化",
          lang === 'zh' ? "启动和加载速度快" : "起動・読込 高速"
        ],
        image: "https://picsum.photos/seed/ssd/400/400",
        link: "/products"
      },
      {
        id: 2,
        title: lang === 'zh' ? "数据存储" : "データ保存",
        description: lang === 'zh' ? "HDD和SSD" : "HDD & SSD",
        features: [
          lang === 'zh' ? "大容量存储" : "大容量保存",
          lang === 'zh' ? "数据备份" : "データバックアップ"
        ],
        image: "https://picsum.photos/seed/hdd/400/400",
        link: "/products"
      },
      {
        id: 3,
        title: lang === 'zh' ? "内存扩展" : "メモリ拡張",
        description: lang === 'zh' ? "DDR4和DDR5" : "DDR4 & DDR5",
        features: [
          lang === 'zh' ? "内存升级" : "メモリ増設",
          lang === 'zh' ? "性能提升" : "パフォーマンス向上"
        ],
        image: "https://picsum.photos/seed/ram/400/400",
        link: "/products"
      },
      {
        id: 4,
        title: lang === 'zh' ? "外围设备" : "周辺機器",
        description: lang === 'zh' ? "USB和雷电接口" : "USB & Thunderbolt",
        features: [
          lang === 'zh' ? "高速传输" : "高速転送",
          lang === 'zh' ? "多功能连接" : "多機能接続"
        ],
        image: "https://picsum.photos/seed/usb/400/400",
        link: "/products"
      },
      {
        id: 5,
        title: lang === 'zh' ? "散热系统" : "冷却システム",
        description: lang === 'zh' ? "CPU和GPU散热器" : "CPU & GPU Cooler",
        features: [
          lang === 'zh' ? "高效散热" : "効率的冷却",
          lang === 'zh' ? "静音设计" : "静音設計"
        ],
        image: "https://picsum.photos/seed/cooler/400/400",
        link: "/products"
      }
    ]
  };

  return mockData;
}); 