/**
 * 用户金币日志类型
 * type 事件所属类型 1：充值相关
 */
export const USER_COINS_LOG_TYPE: any = {
  /** 游戏押注 */
  /** 新手赠送 */
  NEW_GIFT: { value: 5, txt: "新手赠送", clientTxt: "New Gift" },
  /** 游戏押注 */
  GAME_INVEST: { value: 10, txt: "游戏押注", clientTxt: "Game betting" },
  /** 游戏输赢 */
  GAME_WIN_OR_LOSE: { value: 20, txt: "游戏输赢", clientTxt: "Game revenue" },
  /** 赢得彩金 */
  WIN_THE_BONUS: { value: 30, txt: "赢得彩金", clientTxt: "Winning Bonus" },
  /** 领取邮件附件 */
  GET_MAIL_ATTACH: { value: 40, txt: "领取邮件", clientTxt: "Mails" },
  /** 银行存取金币 */
  BANK_SAVE_GET: { value: 50, txt: "银行存取", clientTxt: "Bank" },
  /** 赠送他人金币 */
  GIFT_COINS: { value: 60, txt: "赠送", clientTxt: "Gift" },
  /** 兑换礼包 */
  GET_GIFT_CODE: { value: 70, txt: "兑换礼包", clientTxt: "Exchange Code" },
  /** 领取救济 */
  GET_WELFARE: { value: 80, txt: "领取救济", clientTxt: "Welfare" },
  /** 扣除负债 */
  REDUCE_COINS: { value: 90, txt: "扣除负债", clientTxt: "Deduct arrears" },
  /** 领取亏损返利 */
  GET_LOSS_BONUS: { value: 100, txt: "领取亏损返利", clientTxt: "Loss rebate" },
  /** 领取周期返利 */
  GET_CYCLE_BONUS: { value: 101, txt: '领取周期返利', clientTxt: 'Cycle rebate' },
  /** 领取下注返利 */
  GET_BET_BONUS: { value: 110, txt: "领取下注返利", clientTxt: "Bet rebate" },
  /** 领取累积返利 */
  GET_TOTAL_REBATE: {
    value: 111,
    txt: "领取累积返利",
    clientTxt: "Total rebate",
  },
  /** 商店购买 */
  SHOP_BUY: { value: 120, txt: "商店购买", clientTxt: "Shop" },
  /** 商店2购买 */
  SHOP2_BUY: { value: 121, txt: '商店购买', clientTxt: 'Shop' },
  /** 每日摇奖 */
  DAY_SLOTS: { value: 130, txt: "每日摇奖", clientTxt: "Mini SLots" },
  /** 三选一礼包 */
  ONEOFTHREE_GIFT: {
    value: 140,
    txt: "三选一礼包",
    clientTxt: "One of three gift",
  },
  /** 超值礼包 */
  SUPER_CASH_BACK: {
    value: 150,
    txt: "超值礼包",
    clientTxt: "Super cash back",
  },
  /** 进入第三方游戏 */
  LOGIN_THIRD_GAME: {
    value: 160,
    txt: "进入第三方游戏",
    clientTxt: "Enter Game",
  },
  /** 退出第三方游戏 */
  LOGOUT_THIRD_GAME: {
    value: 170,
    txt: "退出第三方游戏",
    clientTxt: "Exit Game",
  },
  /** 钻石换金币 */
  DIAMOND_CONVERT_COINS: {
    value: 180,
    txt: "钻石换金币",
    clientTxt: "Diamond Convert",
  },
  /** 签到领奖 */
  CHECKIN_AWARD: { value: 190, txt: "签到领奖", clientTxt: "Checking" },
  /** 签到月度领奖 */
  MONTH_CHECKIN_AWARD: {
    value: 200,
    txt: "签到月度领奖",
    clientTxt: "Monthly Gift",
  },
  /** 神秘商店购买 */
  MYSTERY_SHOP_BUY: {
    value: 210,
    txt: "神秘商店购买",
    clientTxt: "Mystery Shop",
  },
  /** 每日礼包购买 */
  EVERY_DAY_BUY: { value: 220, txt: "每日礼包购买", clientTxt: "Daily Gift" },
  /** 登录奖励 */
  LOGIN_AWARD: { value: 230, txt: "登录奖励", clientTxt: "Login Gift" },
  /** 登录特殊奖励 */
  LOGIN_AWARD_SPECIAL: {
    value: 240,
    txt: "登录特殊奖励",
    clientTxt: "Login Gift Plus",
  },
  /** 助力转盘 */
  HELP_TURNTABLE: {
    value: 250,
    txt: "助力转盘领奖",
    clientTxt: "Mini Turntable",
  },
  /** VIP等级奖励 */
  VIP_AWARD: { value: 260, txt: "VIP等级奖励", clientTxt: "VIP Level Gift" },
  /** VIP每日奖励 */
  VIP_DAY_AWARD: {
    value: 261,
    txt: "VIP每日奖励",
    clientTxt: "VIP Daily Gift",
  },
  /** VIP每周奖励 */
  VIP_WEEK_AWARD: {
    value: 270,
    txt: "VIP每周奖励",
    clientTxt: "VIP Weekly Gift",
  },
  /** VIP每月奖励 */
  VIP_MONTH_AWARD: {
    value: 280,
    txt: "VIP每月奖励",
    clientTxt: "VIP Monthly Gift",
  },
  /** 提现 */
  WITHDRAW: { value: 290, txt: "提现", clientTxt: "Withdraw" },
  /** 游戏取消押注 */
  GAME_CANCEL_INVEST: {
    value: 300,
    txt: "游戏取消押注",
    clientTxt: "Cancel Bet",
  },
  /** 动态活动领奖 */
  ACTIVITY_TASK: { value: 310, txt: "动态活动领奖", clientTxt: "Task Gift" },
  /** 动态活动黄金奖励解锁 */
  ACTIVITY_VIP_UNLOCK: {
    value: 320,
    txt: "黄金奖励解锁",
    clientTxt: "Task unlock",
  },
  /** 领取下级返利 */
  REABTE_RECEIVE: {
  value: 330,
    txt: "领取下级返利",
    clientTxt: "Child rebate",
  },
  /** 游戏总输赢（客户端用，出入房间时只记录一次） */
  GAME_WIN_OR_LOSE_TOTAL: {
    value: 999,
    txt: "游戏总输赢",
    clientTxt: "Game revenue",
  },
};

export const ENUM = (type: string) => {
  let arr = [];
  for (let key in USER_COINS_LOG_TYPE) {
    arr.push(USER_COINS_LOG_TYPE[key]);
  }
  return arr.find((i) => i.value == type).clientTxt;
};
