/**
 * 邀请功能 Mock 数据
 */

import { InviteRecord, InviteStatistics, ActivityInfo, InviteCodeResponse } from '@/api/invite';

export const mockInviteCode: InviteCodeResponse = {
  code: 'INV' + Math.random().toString(36).substring(2, 8).toUpperCase(),
  inviteUrl: 'https://example.com/invite?code=INVITE123',
  expireTime: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString()
};

export const mockInviteRecords: InviteRecord[] = [
  {
    id: 'inv_001',
    inviteePhone: '138****8888',
    inviteeName: '张三',
    status: 'rewarded',
    inviteTime: '2026-04-01 10:30:00',
    activateTime: '2026-04-01 14:20:00',
    rewardTime: '2026-04-02 09:00:00',
    couponName: '满减优惠券',
    couponAmount: 20
  },
  {
    id: 'inv_002',
    inviteePhone: '139****6666',
    inviteeName: '李四',
    status: 'activated',
    inviteTime: '2026-04-02 11:15:00',
    activateTime: '2026-04-03 09:45:00'
  },
  {
    id: 'inv_003',
    inviteePhone: '137****5555',
    status: 'pending',
    inviteTime: '2026-04-03 08:00:00'
  },
  {
    id: 'inv_004',
    inviteePhone: '136****4444',
    inviteeName: '王五',
    status: 'rewarded',
    inviteTime: '2026-03-28 16:30:00',
    activateTime: '2026-03-29 10:15:00',
    rewardTime: '2026-03-30 08:30:00',
    couponName: '满减优惠券',
    couponAmount: 20
  },
  {
    id: 'inv_005',
    inviteePhone: '135****3333',
    status: 'failed',
    inviteTime: '2026-03-25 14:20:00',
    activateTime: '2026-03-26 11:00:00'
  },
  {
    id: 'inv_006',
    inviteePhone: '134****2222',
    inviteeName: '赵六',
    status: 'activated',
    inviteTime: '2026-04-02 15:40:00',
    activateTime: '2026-04-03 08:20:00'
  },
  {
    id: 'inv_007',
    inviteePhone: '133****1111',
    status: 'pending',
    inviteTime: '2026-04-03 10:00:00'
  },
  {
    id: 'inv_008',
    inviteePhone: '132****9999',
    inviteeName: '钱七',
    status: 'rewarded',
    inviteTime: '2026-03-20 09:30:00',
    activateTime: '2026-03-21 13:50:00',
    rewardTime: '2026-03-22 10:00:00',
    couponName: '满减优惠券',
    couponAmount: 20
  }
];

export const mockInviteStats: InviteStatistics = {
  totalInvite: 8,
  validInvite: 6,
  rewardCount: 4,
  pendingCount: 2,
  totalRewardAmount: 80
};

export const mockActivityInfo: ActivityInfo = {
  activityId: 'act_001',
  title: '邀请好友得优惠券',
  description: '邀请好友注册并完成首单，双方均可获得优惠券奖励',
  couponName: '满减优惠券',
  couponAmount: 20,
  startTime: '2026-03-01 00:00:00',
  endTime: '2026-06-30 23:59:59',
  rules: [
    '邀请好友注册并完成首单',
    '您将获得一张20元满减优惠券',
    '被邀请人也将获得一张新人优惠券',
    '优惠券可用于购买指定商品抵扣',
    '每个用户最多可获得10次邀请奖励'
  ],
  isActive: true
};
