import React, { useEffect, useState } from "react"
import './global.less'
import { businessPlanData, GENDER_TYPE } from "../../page/businessPlan/create/const"
import weComTaskStore from '@/pages/weComTask/store'
import { toJS } from 'mobx';

const targetingData = [
    { key: 'msgTagIds', name: '智能标签' },
    { key: 'msgExcludeTagIds', name: '排除智能标签' },
    { key: 'platformKey', name: '书城' },
    { key: 'sysExternalExcludeTagNames', name: '排除标签' },
    { key: 'lastBookNameList', name: '最近阅读书籍' },
    { key: 'lastChapterNameList', name: '最近阅读章节' },
    { key: 'platformUserId', name: '书城用户ID' },
    { key: 'rechargeBook', name: '充值小说' },
    { key: 'allCorp', name: '是否查询所有公司' },
    { key: 'begin', name: '关注时间' },
    { key: 'genders', name: '性别' },
    { key: 'rechargeCount', name: '充值次数' },
    { key: 'rechargeMoney', name: '充值金额' },
    { key: 'lastRechargeTime', name: '最后充值时间' },
    { key: 'lastReadTime', name: '最近阅读时间' },
    { key: 'firstRechargeMoney', name: '首充金额' },
    { key: 'rechargeMoneyMax', name: '单笔最大充值金额' },
    { key: 'subHour', name: '关注距今时间' },
    { key: 'subDay', name: '关注距今天' },
    { key: 'lastRechargeHour', name: '最近充值时间距今（小时）' },
    { key: 'lastReadHour', name: '最近阅读至今（小时）' },
    { key: 'opers', name: '手机系统' },
    { key: 'firstAddGroupTime', name: '首次拉群时间' },
    { key: 'lastAddGroupTime', name: '最近拉群时间' },
    { key: 'lastExitTime', name: '最近退群时间' },
    { key: 'firstAddGroupHourRange', name: '首次拉群(最近N小时)' },
    { key: 'lastAddGroupHourRange', name: '最近拉群(最近N小时)' },
    { key: 'lastExitHourRange', name: '最近退群(最近N小时)' },
    { key: 'addGroupCount', name: '进群次数' },
    { key: 'exitGroupCount', name: '退群次数' },
    { key: 'retentionGroupCount', name: '留存群聊数' },
    { key: 'repeatRang', name: '重粉范围' },
    { key: 'repeatOperateType', name: '重粉操作类型' },
    { key: 'corpIdCount', name: '添加主体数' },
    { key: 'corpUserIdCount', name: '添加客服数' },
    { key: 'groupRepeatRang', name: '群重名过滤范围' },
    { key: 'groupOperateType', name: '群重名操作类型' },
    { key: 'groupNameList', name: '群名称列表' },
]

const targetingGroupData = [
    { key: 'groupChatNames', name: '群名称列表' },
    { key: 'groupChatTime', name: '群创建时间' },
    { key: 'groupChatHour', name: '群创建时长' },
    { key: 'groupChatUser', name: '群人数' }
]
interface Props {
    data: any,
    bookCityList: { label: string, value: string }[]
    configName?: string
    configType?: BUSINES_SPLAN_API.ConfigTypeProps
}
interface ContentProps {
    unlimited?: string,         // 不限
    msgTagIds?: { [x: string]: string }[], // 智能标签
    msgExcludeTagIds?: { [x: string]: string }[], // 排除智能标签
    platformKey?: string,   // 书城
    sysExternalExcludeTagNames?: string[],   // 排除标签
    lastBookNameList?: string[],
    lastChapterNameList?: string[],
    platformUserId?: string,// 书城用户ID
    rechargeBook?: string,  // 充值小说
    allCorp?: boolean,  // 是否查询所有公司
    begin?: {               // 关注时间
        beginTime?: string,
        endTime?: string
    },
    genders?: string[],     // 性别
    rechargeCount?: {       // 充值次数
        rechargeCountMin?: number,
        rechargeCountMax?: number
    },
    rechargeMoney?: {       // 充值金额
        rechargeMoneyMin?: number
        rechargeMoneyMax?: number
    },
    lastRechargeTime?: {        // 最后充值时间
        lastRechargeTimeMin?: string,
        lastRechargeTimeMax?: string
    },
    lastReadTime?: {        // 最近阅读时间
        lastReadTimeMin?: string,
        lastReadTimeMax?: string
    },
    firstRechargeMoney?: { // 首充金额
        firstRechargeMoneyMin?: number,
        firstRechargeMoneyMax?: number
    },
    rechargeMoneyMax?: {  // 单笔最大充值金额
        rechargeMoneyMaxMin?: number,
        rechargeMoneyMaxMax?: number
    },
    subHour?: {          // 关注距今时间
        subHourMin?: number,
        subHourMax?: number
    },
    subDay?: {          // 关注距今天
        subDayMin?: number
        subDayMax?: number
    },
    lastRechargeHour?: {  // 最近一次充值距今
        lastRechargeHourMin?: number,
        lastRechargeHourMax?: number
    },
    lastReadHour?: {  // 最近阅读至今
        lastReadHourMin?: number,
        lastReadHourMax?: number
    },
    opers?: string[]   // 手机系统
    // 群
    groupChatNames?: string,
    groupChatTime?: {
        groupChatBeginTime?: string,
        groupChatEndTime?: string
    }
    groupChatHour?: {
        groupChatHourMin?: number,
        groupChatHourMax?: number
    }
    groupChatUser?: {
        groupChatUserMin?: number,
        groupChatUserMax?: number
    }
    firstAddGroupTime?: { // 首次拉群时间
        firstAddGroupTimeMin?: string,
        firstAddGroupTimeMax?: string
    }
    lastAddGroupTime?: { // 最近拉群时间
        lastAddGroupTimeMin?: string,
        lastAddGroupTimeMax?: string
    }
    lastExitTime?: { // 最近退群时间
        lastExitTimeMin?: string,
        lastExitTimeMax?: string
    }
    firstAddGroupHourRange?: { // 首次拉群(最近N小时)
        firstAddGroupHourRangeMin?: string,
        firstAddGroupHourRangeMax?: string
    }
    lastAddGroupHourRange?: { // 最近拉群(最近N小时)
        lastAddGroupHourRangeMin?: string,
        lastAddGroupHourRangeMax?: string
    }
    lastExitHourRange?: { // 最近退群(最近N小时)
        lastExitHourRangeMin?: string,
        lastExitHourRangeMax?: string
    }
    addGroupCount?: { // 进群次数
        addGroupCountMin?: string,
        addGroupCountMax?: string
    }
    exitGroupCount?: { // 退群次数
        exitGroupCountMin?: string,
        exitGroupCountMax?: string
    }
    retentionGroupCount?: { // 留存群聊数
        retentionGroupCountMin?: string,
        retentionGroupCountMax?: string
    },
    repeatRang?: Record<string, string>,
    repeatOperateType?: 0 | 1,
    corpIdCount?: {
        minCorpIdCount?: number,
        maxCorpIdCount?: number
    },
    corpUserIdCount?: {
        minCorpUserIdCount?: number,
        maxCorpUserIdCount?: number
    },
    groupRepeatRang?: Record<string, string>,
    groupOperateType?: 0 | 1,
    groupNameList?: string[],
}

/** 重置筛选用户数据 */
export const resetFilterUserData = (data: { [x: string]: any }): ContentProps => {
    const {
        beginTime, endTime, rechargeCountMin, rechargeCountMax, rechargeMoneyMin, rechargeMoneyMax, lastRechargeTimeMin, lastRechargeTimeMax,
        firstRechargeMoneyMin, firstRechargeMoneyMax, rechargeMoneyMaxMin, rechargeMoneyMaxMax, subHourMin, subHourMax, subDayMin, subDayMax,
        lastRechargeHourMin, lastRechargeHourMax, groupChatNames, groupChatBeginTime, groupChatEndTime, groupChatHourMin, groupChatHourMax,
        groupChatUserMin, groupChatUserMax, lastReadHourMin, lastReadHourMax, lastReadTimeMin, lastReadTimeMax, firstAddGroupTimeMin, firstAddGroupTimeMax,
        lastAddGroupTimeMin, lastAddGroupTimeMax, lastExitTimeMin, lastExitTimeMax, firstAddGroupHourRangeMin, firstAddGroupHourRangeMax,
        lastAddGroupHourRangeMin, lastAddGroupHourRangeMax, lastExitHourRangeMin, lastExitHourRangeMax, addGroupCountMin, addGroupCountMax,
        exitGroupCountMin, exitGroupCountMax, retentionGroupCountMin, retentionGroupCountMax, minCorpIdCount, maxCorpIdCount, minCorpUserIdCount, maxCorpUserIdCount,
        ...params
    } = data

    const newData: ContentProps = { ...params }
    if (beginTime || endTime) {
        newData.begin = { beginTime, endTime }
    }
    if (rechargeCountMin || rechargeCountMax) {
        newData.rechargeCount = { rechargeCountMin, rechargeCountMax }
    }
    if (rechargeMoneyMin || rechargeMoneyMax) {
        newData.rechargeMoney = { rechargeMoneyMin, rechargeMoneyMax }
    }
    if (lastRechargeTimeMin || lastRechargeTimeMax) {
        newData.lastRechargeTime = { lastRechargeTimeMin, lastRechargeTimeMax }
    }
    if (lastReadTimeMin || lastReadTimeMax) {
        newData.lastReadTime = { lastReadTimeMin, lastReadTimeMax }
    }
    if (firstRechargeMoneyMin || firstRechargeMoneyMax) {
        newData.firstRechargeMoney = { firstRechargeMoneyMin, firstRechargeMoneyMax }
    }
    if (rechargeMoneyMaxMin || rechargeMoneyMaxMax) {
        newData.rechargeMoneyMax = { rechargeMoneyMaxMin, rechargeMoneyMaxMax }
    }
    if (subHourMin || subHourMax) {
        newData.subHour = { subHourMin, subHourMax }
    }
    if (subDayMin || subDayMax) {
        newData.subDay = { subDayMin, subDayMax }
    }
    if (lastRechargeHourMin || lastRechargeHourMax) {
        newData.lastRechargeHour = { lastRechargeHourMin, lastRechargeHourMax }
    }
    if (lastReadHourMin || lastReadHourMax) {
        newData.lastReadHour = { lastReadHourMin, lastReadHourMax }
    }
    if (groupChatNames?.length) {
        newData.groupChatNames = groupChatNames.join('、')
    }
    if (groupChatBeginTime && groupChatEndTime) {
        newData.groupChatTime = { groupChatBeginTime, groupChatEndTime }
    }
    if (groupChatHourMin || groupChatHourMax) {
        newData.groupChatHour = { groupChatHourMin, groupChatHourMax }
    }
    if (groupChatUserMin || groupChatUserMax) {
        newData.groupChatUser = { groupChatUserMin, groupChatUserMax }
    }
    if (firstAddGroupTimeMin || firstAddGroupTimeMax) {
        newData.firstAddGroupTime = { firstAddGroupTimeMin, firstAddGroupTimeMax }
    }
    if (lastAddGroupTimeMin || lastAddGroupTimeMax) {
        newData.lastAddGroupTime = { lastAddGroupTimeMin, lastAddGroupTimeMax }
    }
    if (lastExitTimeMin || lastExitTimeMax) {
        newData.lastExitTime = { lastExitTimeMin, lastExitTimeMax }
    }
    if (firstAddGroupHourRangeMin || firstAddGroupHourRangeMax) {
        newData.firstAddGroupHourRange = { firstAddGroupHourRangeMin, firstAddGroupHourRangeMax }
    }
    if (lastAddGroupHourRangeMin || lastAddGroupHourRangeMax) {
        newData.lastAddGroupHourRange = { lastAddGroupHourRangeMin, lastAddGroupHourRangeMax }
    }
    if (lastExitHourRangeMin || lastExitHourRangeMax) {
        newData.lastExitHourRange = { lastExitHourRangeMin, lastExitHourRangeMax }
    }
    if (addGroupCountMin || addGroupCountMax) {
        newData.addGroupCount = { addGroupCountMin, addGroupCountMax }
    }
    if (exitGroupCountMin || exitGroupCountMax) {
        newData.exitGroupCount = { exitGroupCountMin, exitGroupCountMax }
    }
    if (retentionGroupCountMin || retentionGroupCountMax) {
        newData.retentionGroupCount = { retentionGroupCountMin, retentionGroupCountMax }
    }
    if (minCorpIdCount || maxCorpIdCount || minCorpIdCount === 0 || maxCorpIdCount === 0) {
        newData.corpIdCount = { minCorpIdCount, maxCorpIdCount }
    }
    if (minCorpUserIdCount || maxCorpUserIdCount || minCorpUserIdCount === 0 || maxCorpUserIdCount === 0) {
        newData.corpUserIdCount = { minCorpUserIdCount, maxCorpUserIdCount }
    }
    return newData
}

/**
 * 定向处理展示
 * @returns 
 */
const FilterUserTooltip: React.FC<Props> = (props) => {

    /**********************/
    const { bookPlatForm, bookList } = toJS(weComTaskStore.data)
    const { data, configName, bookCityList, configType = 'USER_GROUP' } = props
    const [content, setContent] = useState<ContentProps>({})

    // const getAllBook = useAjax(() => getAllBookApi()) //书
    // const getBookPlatInfoAll = useAjax(() => getBookPlatInfoAllApi()) //书城
    /**********************/

    // useEffect(() => {
    //     if (configType === 'USER_GROUP') {
    //         getBookPlatInfoAll.run().then((res) => {
    //             if (res?.data) setBookPlatForm(res.data)
    //         })
    //         getAllBook.run().then(res => {
    //             if (res?.data) {
    //                 setBookList(res.data)
    //             }
    //         })
    //     }
    // }, [configType])

    useEffect(() => {
        const currentTargetingData = configType === 'GROUP_GROUP' ? targetingGroupData : targetingData
        if (data) {
            const newData = resetFilterUserData(data)
            let newConten: ContentProps = newData
            newConten.unlimited = currentTargetingData.filter((item: any) => !Object.keys(newData).includes(item.key))?.map((item: any) => item?.name)?.toString()
            setContent(newConten)
        } else {
            setContent({ unlimited: currentTargetingData?.map((item: any) => item?.name)?.toString() })
        }
    }, [data, configType])



    return <div className='targetingTooltip'>
        {configName && <div style={{ fontWeight: 'bold', marginBottom: 4 }}>{configName}</div>}
        {content?.msgTagIds && <div>
            <strong>智能标签：</strong><span>{`${content?.msgTagIds?.['business'] ? `业务：${businessPlanData.find(i => i.value == content?.msgTagIds['business'])?.label}` : ''}--${content?.msgTagIds?.['bookCity'] ? `书城：${bookPlatForm.find(i => i.id == content?.msgTagIds['bookCity'])?.platformName}` : ''}--${content?.msgTagIds?.['product'] ? `产品：${bookList.find(i => i.id == content?.msgTagIds['product'])?.bookName}` : ''}`}</span>
        </div>}
        {content?.msgExcludeTagIds && <div>
            <strong>排除智能标签：</strong><span>{`${content?.msgExcludeTagIds?.['business'] ? `业务：${businessPlanData.find(i => i.value == content?.msgExcludeTagIds['business'])?.label}` : ''}--${content?.msgExcludeTagIds?.['bookCity'] ? `书城：${bookPlatForm.find(i => i.id == content?.msgExcludeTagIds['bookCity'])?.platformName}` : ''}--${content?.msgExcludeTagIds?.['product'] ? `产品：${bookList.find(i => i.id == content?.msgExcludeTagIds['product'])?.bookName}` : ''}`}</span>
        </div>}
        {content?.sysExternalExcludeTagNames && <div>
            <strong>排除标签：</strong><span>{content?.sysExternalExcludeTagNames.join('、') || '--'}</span>
        </div>}
        {content?.platformKey && <div>
            <strong>书城：</strong><span>{bookCityList?.find(item => item.value === content?.platformKey)?.label || '--'}</span>
        </div>}
        {content?.lastBookNameList && <div>
            <strong>最近阅读书籍：</strong><span>{content?.lastBookNameList?.join('、') || '--'}</span>
        </div>}
        {content?.lastChapterNameList && <div>
            <strong>最近阅读章节：</strong><span>{content?.lastChapterNameList?.join('、') || '--'}</span>
        </div>}
        {content?.platformUserId && <div>
            <strong>书城用户ID：</strong><span>{content?.platformUserId}</span>
        </div>}
        {content?.rechargeBook && <div>
            <strong>充值小说：</strong><span>{content?.rechargeBook}</span>
        </div>}
        {content?.begin && <div>
            <strong>关注时间：</strong><span>{content?.begin?.beginTime ? content?.begin?.beginTime : '不限'} - {content?.begin?.endTime ? content?.begin?.endTime : '不限'}</span>
        </div>}
        {content?.genders?.length > 0 && <div>
            <strong>性别：</strong><span>{content?.genders.map(g => GENDER_TYPE[g]).toString()}</span>
        </div>}
        {content?.rechargeCount && <div>
            <strong>充值次数：</strong><span>{content?.rechargeCount?.rechargeCountMin ? content?.rechargeCount?.rechargeCountMin : '不限'} - {content?.rechargeCount?.rechargeCountMax ? content?.rechargeCount?.rechargeCountMax : '不限'}</span>
        </div>}
        {content?.rechargeMoney && <div>
            <strong>充值金额：</strong><span>{content?.rechargeMoney?.rechargeMoneyMin ? content?.rechargeMoney?.rechargeMoneyMin : '不限'} - {content?.rechargeMoney?.rechargeMoneyMax ? content?.rechargeMoney?.rechargeMoneyMax : '不限'}</span>
        </div>}
        {content?.lastRechargeTime && <div>
            <strong>最后充值时间：</strong><span>{content?.lastRechargeTime?.lastRechargeTimeMin ? content?.lastRechargeTime?.lastRechargeTimeMin : '不限'} - {content?.lastRechargeTime?.lastRechargeTimeMax ? content?.lastRechargeTime?.lastRechargeTimeMax : '不限'}</span>
        </div>}
        {content?.firstRechargeMoney && <div>
            <strong>首充金额：</strong><span>{content?.firstRechargeMoney?.firstRechargeMoneyMin ? content?.firstRechargeMoney?.firstRechargeMoneyMin : '不限'} - {content?.firstRechargeMoney?.firstRechargeMoneyMax ? content?.firstRechargeMoney?.firstRechargeMoneyMax : '不限'}</span>
        </div>}
        {content?.rechargeMoneyMax && <div>
            <strong>单笔最大充值金额：</strong><span>{content?.rechargeMoneyMax?.rechargeMoneyMaxMin ? content?.rechargeMoneyMax?.rechargeMoneyMaxMin : '不限'} - {content?.rechargeMoneyMax?.rechargeMoneyMaxMax ? content?.rechargeMoneyMax?.rechargeMoneyMaxMax : '不限'}</span>
        </div>}
        {content?.subHour && <div>
            <strong>关注距今时间：</strong><span>{content?.subHour?.subHourMin ? content?.subHour?.subHourMin + '小时' : '不限'} - {content?.subHour?.subHourMax ? content?.subHour?.subHourMax + '小时' : '不限'}</span>
        </div>}
        {content?.subDay && <div>
            <strong>关注距今天：</strong><span>{content?.subDay?.subDayMin ? content?.subDay?.subDayMin + '天' : '不限'} - {content?.subDay?.subDayMax ? content?.subDay?.subDayMax + '天' : '不限'}</span>
        </div>}
        {content?.lastRechargeHour && <div>
            <strong>最近一次充值距今（小时）：</strong><span>{content?.lastRechargeHour?.lastRechargeHourMin ? content?.lastRechargeHour?.lastRechargeHourMin + '小时' : '不限'} - {content?.lastRechargeHour?.lastRechargeHourMax ? content?.lastRechargeHour?.lastRechargeHourMax + '小时' : '不限'}</span>
        </div>}
        {content?.lastReadTime && <div>
            <strong>最近阅读时间：</strong><span>{content?.lastReadTime?.lastReadTimeMin ? content?.lastReadTime?.lastReadTimeMin : '不限'} - {content?.lastReadTime?.lastReadTimeMax ? content?.lastReadTime?.lastReadTimeMax : '不限'}</span>
        </div>}
        {content?.lastReadHour && <div>
            <strong>最近阅读至今（小时）：</strong><span>{content?.lastReadHour?.lastReadHourMin ? content?.lastReadHour?.lastReadHourMin + '小时' : '不限'} - {content?.lastReadHour?.lastReadHourMax ? content?.lastReadHour?.lastReadHourMax + '小时' : '不限'}</span>
        </div>}
        {content?.opers?.length > 0 && <div>
            <strong>手机系统：</strong><span>{content?.opers.map(g => ({ '0': '未知', '1': '安卓', '2': 'IOS' } as any)[g]).toString()}</span>
        </div>}
        {content?.groupChatNames && <div>
            <strong>群名称列表：</strong><span>{content?.groupChatNames?.toString()}</span>
        </div>}
        {content?.groupChatTime && <div>
            <strong>群创建时间：</strong><span>{content?.groupChatTime?.groupChatBeginTime ? content?.groupChatTime?.groupChatBeginTime : '不限'} - {content?.groupChatTime?.groupChatEndTime ? content?.groupChatTime?.groupChatEndTime : '不限'}</span>
        </div>}
        {content?.groupChatHour && <div>
            <strong>群创建时长：</strong><span>{content?.groupChatHour?.groupChatHourMin ? content?.groupChatHour?.groupChatHourMin + '小时' : '不限'} - {content?.groupChatHour?.groupChatHourMax ? content?.groupChatHour?.groupChatHourMax + '小时' : '不限'}</span>
        </div>}
        {content?.groupChatUser && <div>
            <strong>群人数：</strong><span>{content?.groupChatUser?.groupChatUserMin ? content?.groupChatUser?.groupChatUserMin : '不限'} - {content?.groupChatUser?.groupChatUserMax ? content?.groupChatUser?.groupChatUserMax : '不限'}</span>
        </div>}

        {content?.firstAddGroupTime && <div>
            <strong>首次拉群时间：</strong><span>{content?.firstAddGroupTime?.firstAddGroupTimeMin ? content?.firstAddGroupTime?.firstAddGroupTimeMin : '不限'} - {content?.firstAddGroupTime?.firstAddGroupTimeMax ? content?.firstAddGroupTime?.firstAddGroupTimeMax : '不限'}</span>
        </div>}
        {content?.lastAddGroupTime && <div>
            <strong>最近拉群时间：</strong><span>{content?.lastAddGroupTime?.lastAddGroupTimeMin ? content?.lastAddGroupTime?.lastAddGroupTimeMin : '不限'} - {content?.lastAddGroupTime?.lastAddGroupTimeMax ? content?.lastAddGroupTime?.lastAddGroupTimeMax : '不限'}</span>
        </div>}
        {content?.lastExitTime && <div>
            <strong>最近退群时间：</strong><span>{content?.lastExitTime?.lastExitTimeMin ? content?.lastExitTime?.lastExitTimeMin : '不限'} - {content?.lastExitTime?.lastExitTimeMax ? content?.lastExitTime?.lastExitTimeMax : '不限'}</span>
        </div>}
        {content?.firstAddGroupHourRange && <div>
            <strong>首次拉群(最近N小时)：</strong><span>{content?.firstAddGroupHourRange?.firstAddGroupHourRangeMin ? content?.firstAddGroupHourRange?.firstAddGroupHourRangeMin : '不限'} - {content?.firstAddGroupHourRange?.firstAddGroupHourRangeMax ? content?.firstAddGroupHourRange?.firstAddGroupHourRangeMax : '不限'}</span>
        </div>}
        {content?.lastAddGroupHourRange && <div>
            <strong>最近拉群(最近N小时)：</strong><span>{content?.lastAddGroupHourRange?.lastAddGroupHourRangeMin ? content?.lastAddGroupHourRange?.lastAddGroupHourRangeMin : '不限'} - {content?.lastAddGroupHourRange?.lastAddGroupHourRangeMax ? content?.lastAddGroupHourRange?.lastAddGroupHourRangeMax : '不限'}</span>
        </div>}
        {content?.lastExitHourRange && <div>
            <strong>最近退群(最近N小时)：</strong><span>{content?.lastExitHourRange?.lastExitHourRangeMin ? content?.lastExitHourRange?.lastExitHourRangeMin : '不限'} - {content?.lastExitHourRange?.lastExitHourRangeMax ? content?.lastExitHourRange?.lastExitHourRangeMax : '不限'}</span>
        </div>}
        {content?.addGroupCount && <div>
            <strong>进群次数：</strong><span>{content?.addGroupCount?.addGroupCountMin ? content?.addGroupCount?.addGroupCountMin : '不限'} - {content?.addGroupCount?.addGroupCountMax ? content?.addGroupCount?.addGroupCountMax : '不限'}</span>
        </div>}
        {content?.exitGroupCount && <div>
            <strong>退群次数：</strong><span>{content?.exitGroupCount?.exitGroupCountMin ? content?.exitGroupCount?.exitGroupCountMin : '不限'} - {content?.exitGroupCount?.exitGroupCountMax ? content?.exitGroupCount?.exitGroupCountMax : '不限'}</span>
        </div>}
        {content?.retentionGroupCount && <div>
            <strong>留存群聊数：</strong><span>{content?.retentionGroupCount?.retentionGroupCountMin ? content?.retentionGroupCount?.retentionGroupCountMin : '不限'} - {content?.retentionGroupCount?.retentionGroupCountMax ? content?.retentionGroupCount?.retentionGroupCountMax : '不限'}</span>
        </div>}

        {configType === 'USER_GROUP' && <div>
            <strong>是否查询所有公司：</strong><span>{content?.allCorp ? '是' : '否'}</span>
        </div>}

        {(content?.repeatRang) && <div>
            <strong>重粉范围：</strong><span>{Object.values(content?.repeatRang).map(corpName => corpName).join('、')}</span>
        </div>}
        {(content?.repeatOperateType || content?.repeatOperateType == 0) && <div>
            <strong>重粉操作类型：</strong><span>{content?.repeatOperateType == 0 ? '排除运营' : '去重运营'}</span>
        </div>}
        {content?.corpIdCount && <div>
            <strong>添加主体数：</strong><span>{content?.corpIdCount?.minCorpIdCount ? content?.corpIdCount?.minCorpIdCount : '不限'} - {content?.corpIdCount?.maxCorpIdCount ? content?.corpIdCount?.maxCorpIdCount : '不限'}</span>
        </div>}
        {content?.corpUserIdCount && <div>
            <strong>添加客服数：</strong><span>{content?.corpUserIdCount?.minCorpUserIdCount ? content?.corpUserIdCount?.minCorpUserIdCount : '不限'} - {content?.corpUserIdCount?.maxCorpUserIdCount ? content?.corpUserIdCount?.maxCorpUserIdCount : '不限'}</span>
        </div>}
        {(content?.groupRepeatRang) && <div>
            <strong>群重名过滤范围：</strong><span>{Object.values(content?.groupRepeatRang).map(corpName => corpName).join('、')}</span>
        </div>}
        {(content?.groupOperateType || content?.groupOperateType == 0) && <div>
            <strong>群重名操作类型：</strong><span>{content?.groupOperateType == 0 ? '历史群' : '当前所在群'}</span>
        </div>}
        {content?.groupNameList?.length > 0 && <div>
            <strong>群名称列表：</strong><span>{content.groupNameList.join('、')}</span>
        </div>}

        {content?.unlimited && <div>
            <strong>不限：</strong><span>{content?.unlimited}</span>
        </div>}
    </div>
}

export default React.memo(FilterUserTooltip)