import { listClass } from '@/constant/global'

const arrToMap = arr =>
  arr.reduce((res, cur) => {
    res[cur.value] = cur.label
    return res
  }, {})

export const userTypeList = [
  { value: 'sys_user', label: '后台管理',listClass: listClass.primary},
  { value: 'app_user', label: 'APP用户',listClass: listClass.info},
]

export const genderList = [
  { value: 0, label: '未知', listClass: listClass.warning },
  { value: 1, label: '女', listClass: listClass.danger },
  { value: 2, label: '男', listClass: listClass.primary }
]

export const authList = [
  { value: 0, label: '未认证', listClass: listClass.danger },
  { value: 1, label: '已认证', listClass: listClass.primary }
]

export const userStatusList = [
  { value: 0, label: '可用', listClass: listClass.primary },
  { value: 1, label: '不可用', listClass: listClass.danger }
]

// 链接类型  1 网页    2 app内页   3 JSON数据
export const bannerLinkTypeList = [
  { value: 0, label: '无' },
  { value: 1, label: '网页' },
  // { value: 2, label: 'app内页' },
  // { value: 3, label: 'JSON数据' },
]

export const bannerStatusList = [
  { value: 0, label: '可用' },
  { value: 1, label: '不可用' }
]

// 1 申请  2 审核通过  3 审核不通过  4 提现取消
export const cashStatusList = [
  { value: 1, label: '申请中',listClass: listClass.warning },
  { value: 2, label: '审核通过',listClass: listClass.primary },
  { value: 3, label: '审核不通过',listClass: listClass.danger },
  { value: 4, label: '提现取消',listClass: listClass.info }
]

export const runStatusList = [
  { value: 0, label: '待执行',listClass: listClass.info },
  { value: 1, label: '执行中',listClass: listClass.warning },
  { value: 2, label: '执行失败',listClass: listClass.danger },
  { value: 3, label: '执行成功',listClass: listClass.primary }
]

export const passwordTypeList = [
  { value: 1, label: '规则生成',listClass: listClass.warning },
  { value: 2, label: '随机密码',listClass: listClass.primary },
]

export const forbidTimeList = [
  { value: 1, label: '封6小时' },
  { value: 2, label: '封1天'},
  { value: 3, label: '封3天' },
  { value: 4, label: '封7天' },
  { value: 5, label: '封一个月' },
  { value: 6, label: '封10年' },
]

// 1 封用户uid  2.封设备uuid  3.imei 4.mac
export const forbidTypeList = [
  { value: 1, label: '用户' },
  { value: 2, label: '设备'},
  { value: 3, label: 'imei' },
  { value: 4, label: 'mac' },
  { value: 5, label: 'ip' },
]

export const memberTypeList = [
  { value: 0, label: '普通会员' ,listClass: listClass.info},
  { value: 1, label: '超级会员' ,listClass: listClass.danger},
]

export const memberStatusList = [
  { value: 0, label: '可用' ,listClass: listClass.info},
  { value: 1, label: '过期' ,listClass: listClass.warning},
  { value: 2, label: '不可用' ,listClass: listClass.danger},
]

export const yesOrNoList = [
  { value: 1, label: '是',listClass: listClass.danger},
  { value: 0, label: '否',listClass: listClass.info},
]

export const isAnchorList = [
  { value: 1, label: '是',listClass: listClass.primary},
  { value: 0, label: '否',listClass: listClass.info},
]

export const enableStatusList = [
  { value: 1, label: '正常'},
  { value: 0, label: '禁用'},
]

export const booleanList = [
  { value: true, label: '是',listClass: listClass.danger},
  { value: false, label: '否',listClass: listClass.info},
]

export const userRiskLowList = [
  { value: 1, label: '低风险',listClass: listClass.info},
  { value: 2, label: '高风险',listClass: listClass.danger},
]

export const videoStatusList = [
  { value: 0, label: '休息中',listClass: listClass.info},
  { value: 1, label: '视频中',listClass: listClass.danger},
]

export const onlineStatusList = [
  { value: 0, label: '离线',listClass: listClass.info},
  { value: 1, label: '在线',listClass: listClass.danger},
]

export const auditStatusList = [
  { value: 1, label: '审核中',listClass: listClass.info},
  { value: 2, label: '审核通过',listClass: listClass.primary},
  { value: 3, label: '审核不通过',listClass: listClass.danger},
]

/**
 * 开启视频接听
 */
export const openVideoStatusList = [
  { value: 0, label: '未开启',listClass: listClass.danger},
  { value: 1, label: '已开启',listClass: listClass.info},
]

export const orderSwitchList = [
  { value: 1, label: '隐藏',listClass: listClass.warning},
  { value: 2, label: '不隐藏',listClass: listClass.info},
]

export const indexDisplayList = [
  { value: 0, label: '不展示',listClass: listClass.warning},
  { value: 1, label: '展示',listClass: listClass.info},
]

// 类型  1 个人详情页    2.IM页面  3 视频页
export const userGiftTypeList = [
  { value: 1, label: '个人详情页'},
  { value: 2, label: 'IM页面'},
  { value: 3, label: '视频页'},
]

// 类型 1-充值 2-礼物 3-守护 4-通话
export const consumeLogTypeList = [
  { value: 1, label: '充值'},
  { value: 2, label: '礼物'},
  { value: 3, label: '守护'},
  { value: 4, label: '通话'},
]

export const consumeLogStatusList = [
  { value: -1, label: '无须分销',listClass: listClass.info},
  { value: 0, label: '待分销',listClass: listClass.warning},
  { value: 1, label: '已分销',listClass: listClass.primary},
]

export const consumeLogCalculateStatusList = [
  { value: false, label: '待计算',listClass: listClass.warning},
  { value: true, label: '已计算',listClass: listClass.primary},
]

// 1 个人详情页   2 视频结束 3 动态   4.IM页面
export const reportTypeList = [
  { value: 1, label: '个人详情页'},
  { value: 2, label: '视频结束'},
  { value: 3, label: '动态'},
  { value: 4, label: 'IM页面'},
]

export const reportStatusList = [
  { value: 0, label: '未处理',listClass: listClass.danger},
  { value: 1, label: '已处理',listClass: listClass.primary},
]


export const platformTypeList = [
  { value: '1', label: '支付宝',listClass: listClass.primary},
  { value: '2', label: '微信',listClass: listClass.danger},
  { value: 'ADMIN', label: '后台操作',listClass: listClass.info},
]

export const payStatusList = [
  { value: 0, label: '待支付',listClass: listClass.info},
  { value: 1, label: '已支付',listClass: listClass.primary},
  { value: 5, label: '已退款',listClass: listClass.info},
  { value: 10, label: '无需支付',listClass: listClass.info},
]

export const ipMicList = [
  { value: 1, label: 'IP'},
  { value: 2, label: 'MIC'},
]

export const accountTypeList = [
  { value: 1, label: '余额',listClass: listClass.info},
  { value: 2, label: '收益',listClass: listClass.primary},
]
// 0=文本消息,1=图片消息,2=语音消息,3=视频消息,4=发送地理位置消息,6=发送文件消息,10=发送提示消息,100=发送第三方自定义消息

export const deleteFlagList = [
  { value: 0, label: '正常',listClass: listClass.primary},
  { value: 1, label: '删除',listClass: listClass.danger},
]

export const imTypeList = [
  { value: 0, label: '文本消息'},
  { value: 1, label: '图片消息'},
  { value: 2, label: '语音消息'},
  { value: 3, label: '视频消息'},
  { value: 4, label: '发送地理位置消息'},
  { value: 6, label: '发送文件消息'},
  { value: 10, label: '发送提示消息'},
  { value: 100, label: '发送第三方自定义消息'},
]

export const userCallStatusList = [
  { value: 0, label: '创建通话', listClass: listClass.info},
  { value: 1, label: '呼叫方连接上', listClass: listClass.info},
  { value: 2, label: '呼叫方取消通话', listClass: listClass.warning},
  { value: 3, label: '接收方连接上', listClass: listClass.info},
  { value: 4, label: '收到通话未接听', listClass: listClass.warning},
  { value: 5, label: '超时未接听', listClass: listClass.warning},
  { value: 6, label: '接收方已拒绝', listClass: listClass.danger},
  { value: 7, label: '已接听', listClass: listClass.primary},
  { value: 8, label: '通话结束', listClass: listClass.primary},
  { value: 9, label: '评分完成', listClass: listClass.primary},
]

export const forbidStatusList = [
  { value: 1, label: '封禁中',listClass: listClass.danger},
  { value: 2, label: '已解封',listClass: listClass.primary},
]

export const rankTypeList = [
  { value: 1, label: '魅力榜',listClass: listClass.danger},
  { value: 2, label: '邀请榜',listClass: listClass.primary},
]

export const rankDataTypeList = [
  { value: 1, label: '日榜',listClass: listClass.primary},
  { value: 2, label: '周榜',listClass: listClass.primary},
  { value: 3, label: '月榜',listClass: listClass.primary},
]

export const unionTotalDataTypeList = [
  { value: 1, label: '每日',listClass: listClass.primary},
  { value: 2, label: '每周',listClass: listClass.primary},
]

export const rankDrawList = [
  { value: true, label: '已领奖',listClass: listClass.primary},
  { value: false, label: '未领奖',listClass: listClass.warning},
]

export const payConfigTypeList = [
  { value: 1, label: '支付宝',listClass: listClass.primary},
  { value: 2, label: '微信',listClass: listClass.success},
]

export const smsTypeList = [
  { value: 'REGISTER', label: '注册短信'},
  { value: 'RESET_PASSWORD', label: '充值密码'},
]

export const userErrorLogTypeList = [
  { value: 1, label: '截屏',listClass: listClass.warning},
  { value: 2, label: '录屏',listClass: listClass.danger},
]

export const userErrorLogHomeIndexList = [
  { value: 'video', label: '直播期间',listClass: listClass.danger},
  { value: 'other', label: '其他',listClass: listClass.success},
]

export const systemPushGroupIdList = [
  { value: 0, label: '单个用户'},
  { value: 1, label: '全部用户'},
  { value: 2, label: '男用户'},
  { value: 3, label: '女用户'},
  { value: 4, label: '认证女神'},
]

export const systemPushLogStatus = [
  { value: 0, label: '未推送',listClass: listClass.info},
  { value: 1, label: '推送中',listClass: listClass.primary},
  { value: 2, label: '推送失败',listClass: listClass.danger},
  { value: 3, label: '推送成功',listClass: listClass.success},
]

export const systemPushSendTimeTypeList = [
  { value: 0, label: '手动发送',listClass: listClass.primary},
  { value: 1, label: '定时发送',listClass: listClass.danger},
]
export const systemPushStatusList = [
  { value: 0, label: '未执行',listClass: listClass.info},
  { value: 1, label: '执行中',listClass: listClass.warning},
  { value: 2, label: '队列执行中',listClass: listClass.primary},
  { value: 3, label: '已完成',listClass: listClass.success},
  { value: 4, label: '已取消',listClass: listClass.info},
  { value: 10, label: '执行失败',listClass: listClass.danger}
]
export const systemPushTypeList = [
  { value: 0, label: '纯文字消息',listClass: listClass.info},
  { value: 1, label: '文本消息',listClass: listClass.primary},
  { value: 2, label: '单图文消息',listClass: listClass.success},
  { value: 3, label: '多图文消息',listClass: listClass.warning},
  { value: 4, label: '纯图文消息',listClass: listClass.warning},
]
export const versionPlatformList = [
  { value: 1, label: '安卓'},
  { value: 2, label: 'IOS'},
]

export const sensitiveTypeList = [
  { value: 1, label: '白名单', listClass: listClass.success},
  { value: 2, label: '黑名单', listClass: listClass.danger},
]

// 1-生效 2-过期 3-待生效

export const topStatusList = [
  { value: 1, label: '生效', listClass: listClass.primary},
  { value: 2, label: '过期', listClass: listClass.info},
  { value: 3, label: '待生效', listClass: listClass.warning},
]
