export enum StatusEnum {
    Normal = 1,
    Stop = 0
}
export enum DataFlowEnum {
    DEFAULT = 0,
    SPECIFIC = 1
}
export enum isDisabledEnum {
    YES = 1,
    NO = 0
}
export enum converStatusEnum {
    INTENTION = 0, //有意向
    UN_RECEIVED = 1, //待领取
    CONVERTED_PROCESS = 2, //转化中
    ADD_RELATION = 3, //已添加
    EXCEPTION = 4, //异常待处理
    CONVERTED = 5, //已成交
    FAILED = 6 //已战败
}
export const conversionMap: Record<converStatusEnum, string> = {
    [converStatusEnum.INTENTION]: '有意向',
    [converStatusEnum.UN_RECEIVED]: '待领取',
    [converStatusEnum.CONVERTED_PROCESS]: '转化中',
    [converStatusEnum.ADD_RELATION]: '已添加',
    [converStatusEnum.EXCEPTION]: '异常待处理',
    [converStatusEnum.CONVERTED]: '已成交',
    [converStatusEnum.FAILED]: '已战败'
}

export enum CluseSourceEnum {
    OFFLINE_LIST = 0
}
export const ClueSourceMap: Record<CluseSourceEnum, string> = {
    [CluseSourceEnum.OFFLINE_LIST]: '线下列表'
}

export enum stateEnum {
    ADD_RELATION = 0, //账号已添加
    NO_EXIST = 1, //账号不存在
    UN_PASS = 2 //账号未通过
}
export const stateMap: Record<stateEnum, string> = {
    [stateEnum.ADD_RELATION]: '账号已添加',
    [stateEnum.NO_EXIST]: '账号不存在',
    [stateEnum.UN_PASS]: '账号未通过'
}
export enum ConverSuccessEnum {
    YES = 1,
    NO = 0
}
export const conversitionMap: Record<ConverSuccessEnum, string> = {
    [ConverSuccessEnum.YES]: '是',
    [ConverSuccessEnum.NO]: '否'
}
export enum SexEnum {
    MALE = 1,
    FEMALE = 2
}
export const sexMap: Record<SexEnum, string> = {
    [SexEnum.MALE]: '男',
    [SexEnum.FEMALE]: '女'
}
export enum formTypeEum {
    INPUT = 1,
    TEXTAREA = 2
}
export const formTypeMap: Record<formTypeEum, string> = {
    [formTypeEum.INPUT]: '单行文本',
    [formTypeEum.TEXTAREA]: '多行文本'
}
export enum templateTypeEum {
    TELE = 5,
    RECEULT = 6
}
export const templateTypeMap: Record<templateTypeEum, string> = {
    [templateTypeEum.TELE]: '电销',
    [templateTypeEum.RECEULT]: '招生'
}
export enum clueStepEnum {
    ADD_FLLOW = 0,
    RECEIVE_CLUE = 1,
    ADD_CLUE_PROGRESS = 2,
    CLUE_COMPLETED = 3,
    UPDATE_CLUSE_PROGRESS = 4
}
export const clueStepMap: Record<clueStepEnum, string> = {
    [clueStepEnum.ADD_FLLOW]: '添加跟进',
    [clueStepEnum.RECEIVE_CLUE]: '领取线索',
    [clueStepEnum.ADD_CLUE_PROGRESS]: '添加进展',
    [clueStepEnum.CLUE_COMPLETED]: '转化完成',
    [clueStepEnum.UPDATE_CLUSE_PROGRESS]: '修改跟进'
}
export enum groupLeaderEnum {
    YES = 1,
    NO = 0
}

const keys: Record<string, any> = {
    conversionMap: conversionMap,
    ClueSourceMap: ClueSourceMap,
    sexMap: sexMap,
    formTypeMap: formTypeMap,
    templateTypeMap: templateTypeMap
}
const generateConverOptions = (key: string) => {
    const mapKey = keys[key]
    return Object.keys(mapKey).map(item => {
        return {
            label: mapKey[item],
            value: Number(item)
        }
    })
}
export const conversionOptions = generateConverOptions('conversionMap')
export const clueSourceOptions = generateConverOptions('ClueSourceMap')
export const sexOptions = generateConverOptions('sexMap')
export const formTypeOptions = generateConverOptions('formTypeMap')
export const templateTypeOptions = generateConverOptions('templateTypeMap')
