import { promotionUrl } from '../utils/promotionAssets'

/**
 * 「关注我们」二维码图加载顺序（前者 404 时 img @error 自动换下一项）：
 * 1. /social/<file> → web/public/social/（Docker 挂载 /var/www/yh-public/social）
 * 2. /<file> → web/public/ 根目录
 * 3. /promotion/social/<file> → deploy/web/dist/promotion（构建/部署脚本同步，非容器挂载）
 */
export function socialFollowImageCandidates(filename) {
  return [`/social/${filename}`, `/${filename}`, promotionUrl(`social/${filename}`)]
}

export const PROMOTION_SOCIAL_FOLLOW = [
  {
    id: 'xiaohongshu',
    label: '小红书',
    imageCandidates: socialFollowImageCandidates('xiaohongshu.png'),
    href: 'https://www.xiaohongshu.com/'
  },
  {
    id: 'douyin',
    label: '抖音',
    imageCandidates: socialFollowImageCandidates('douyin.png'),
    href: 'https://www.douyin.com/'
  },
  {
    id: 'wechat-official',
    label: '公众号',
    imageCandidates: socialFollowImageCandidates('wechat-official.png'),
    href: 'https://mp.weixin.qq.com/'
  },
  {
    id: 'wechat-channels',
    label: '视频号',
    imageCandidates: socialFollowImageCandidates('wechat-channels.jpg'),
    href: 'https://channels.weixin.qq.com/'
  }
]
