import WidthEllipsis from "@/components/widthEllipsis"
import { Space, Statistic } from "antd"
import React from "react"
import H5BuyUser from "./h5BuyUser"
import H5NatureUser from "./h5NatureUser"


function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {

    return [
        {
            label: 'H5游戏信息',
            data: [
                {
                    title: 'H5游戏名称', dataIndex: 'gameName', label: 'H5游戏信息', align: 'center', width: 100, default: 1,
                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
                },
                { title: 'H5游戏ID', dataIndex: 'gameId', label: 'H5游戏信息', align: 'center', width: 70, default: 2 },
            ]
        },
        {
            label: 'H5付费',
            data: [
                {
                    title: 'H5游戏新用户充值金额', dataIndex: 'h5NewUserRechargeMoney', label: 'H5付费', align: 'center', width: 100, default: 3,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5游戏新用户充值人数', dataIndex: 'h5NewUserRechargeNum', label: 'H5付费', align: 'center', width: 100, default: 4,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5游戏新用户累计充值金额', dataIndex: 'h5BuyNewUserTotalAmount', label: 'H5付费', align: 'center', width: 110, default: 5, sorter: true,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5游戏新用户累计充值人数', dataIndex: 'h5BuyNewUserTotalAmountNum', label: 'H5付费', align: 'center', width: 110, default: 6, sorter: true,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5游戏账面充值金额', dataIndex: 'h5BuyAmount', label: 'H5付费', align: 'center', width: 100, default: 7,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5游戏账面充值人数', dataIndex: 'h5BuyAmountNum', label: 'H5付费', align: 'center', width: 100, default: 8,
                    render: (a: string) => <Statistic value={a || 0} />
                },
            ]
        },
        {
            label: 'H5自然量付费',
            data: [
                {
                    title: 'H5自然量新用户充值金额', dataIndex: 'h5NewUserNatureRechargeMoney', label: 'H5自然量付费', align: 'center', width: 100, default: 9,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5自然量新用户充值额比例', dataIndex: 'h5NewUserNatureRechargeRate', label: 'H5自然量付费', align: 'center', width: 100, default: 10,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5自然量新用户充值人数', dataIndex: 'h5NewUserNatureRechargeNum', label: 'H5自然量付费', align: 'center', width: 110, default: 11,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5自然量新用户比例', dataIndex: 'h5NewUserNatureNewUserRate', label: 'H5自然量付费', align: 'center', width: 110, default: 12,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5自然量新用户累计充值金额', dataIndex: 'h5NatureNewUserTotalAmount', label: 'H5自然量付费', align: 'center', width: 110, default: 13, sorter: true,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5自然量新用户累计充值金额比例', dataIndex: 'h5NatureNewUserTotalAmountRate', label: 'H5自然量付费', align: 'center', width: 115, default: 14, sorter: true,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5自然量新用户累计充值人数', dataIndex: 'h5NatureNewUserTotalAmountNum', label: 'H5自然量付费', align: 'center', width: 110, default: 15, sorter: true,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5自然量账面充值金额', dataIndex: 'h5NatureAmount', label: 'H5自然量付费', align: 'center', width: 100, default: 16,
                    render: (a: string) => <Statistic value={a || 0} />
                },
                {
                    title: 'H5自然量账面充值人数', dataIndex: 'h5NatureAmountNum', label: 'H5自然量付费', align: 'center', width: 100, default: 17,
                    render: (a: string) => <Statistic value={a || 0} />
                },
            ]
        },
        {
            label: '操作',
            data: [{
                title: '操作',
                dataIndex: 'cz',
                label: '操作',
                align: 'center',
                width: 150,
                default: 18,
                render: (a: string, b: any) => {
                    return <Space>
                        <H5BuyUser gameName={b?.gameName} h5BuyUserVOList={b?.h5BuyUserVOList} />
                        <H5NatureUser gameName={b?.gameName} h5NatureUserVOList={b?.h5NatureUserVOList} />
                    </Space>
                }
            }]
        },
        // {
        //     label: '导量数据',
        //     data: [
        //         {
        //             title: '游戏买量导入用户数据',
        //             dataIndex: 'h5BuyUserVOList',
        //             label: '导量数据',
        //             align: 'center',
        //             width: 200,
        //             default: 18,
        //             children: [
        //                 {
        //                     title: '游戏名称', dataIndex: `buyGameName`, align: 'center', width: 85,
        //                     render: (a: string, b: any) => {
        //                         return <WidthEllipsis isCopy value={b?.h5BuyUserVOList?.buyGameName} />
        //                     }
        //                 },
        //                 {
        //                     title: '游戏ID', dataIndex: `buyGameId`, align: 'center', width: 85,
        //                     render: (a: string, b: any) => {
        //                         return <WidthEllipsis isCopy value={b?.h5BuyUserVOList?.buyGameId} />
        //                     }
        //                 },
        //                 {
        //                     title: '游戏应用类型', dataIndex: `buyClassify`, align: 'center', width: 100,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5BuyUserVOList?.buyClassify || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '新用户充值金额', dataIndex: `newUserRechargeMoney`, align: 'center', width: 105,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5BuyUserVOList?.newUserRechargeMoney || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '新用户充值人数', dataIndex: `newUserRechargeNum`, align: 'center', width: 105,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5BuyUserVOList?.newUserRechargeNum || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '累计充值金额', dataIndex: `h5LeadBuyNewUserTotalAmount`, align: 'center', width: 90,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5BuyUserVOList?.h5LeadBuyNewUserTotalAmount || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '累计充值人数', dataIndex: `h5LeadBuyNewUserTotalAmountNum`, align: 'center', width: 90,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5BuyUserVOList?.h5LeadBuyNewUserTotalAmountNum || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '账面充值金额', dataIndex: `h5LeadBuyAmountNum`, align: 'center', width: 90,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5BuyUserVOList?.h5LeadBuyAmountNum || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '账面充值人数', dataIndex: `h5LeadBuyAmount`, align: 'center', width: 90,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5BuyUserVOList?.h5LeadBuyAmount || 0} />
        //                     }
        //                 },
        //             ]
        //         },
        //         {
        //             title: '游戏官方导量用户数据',
        //             dataIndex: 'h5NatureUserVOList',
        //             label: '导量数据',
        //             align: 'center',
        //             width: 200,
        //             default: 19,
        //             children: [
        //                 {
        //                     title: '游戏名称', dataIndex: `natureGameName`, align: 'center', width: 85,
        //                     render: (a: string, b: any) => {
        //                         return <WidthEllipsis isCopy value={b?.h5NatureUserVOList?.natureGameName} />
        //                     }
        //                 },
        //                 {
        //                     title: '游戏ID', dataIndex: `natureGameId`, align: 'center', width: 85,
        //                     render: (a: string, b: any) => {
        //                         return <WidthEllipsis isCopy value={b?.h5NatureUserVOList?.natureGameId} />
        //                     }
        //                 },
        //                 {
        //                     title: '游戏应用类型', dataIndex: `natureClassify`, align: 'center', width: 100,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5NatureUserVOList?.natureClassify || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '新用户充值金额', dataIndex: `newUserRechargeMoney`, align: 'center', width: 105,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5NatureUserVOList?.newUserRechargeMoney || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '新用户充值人数', dataIndex: `newUserRechargeNum`, align: 'center', width: 105,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5NatureUserVOList?.newUserRechargeNum || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '累计充值金额', dataIndex: `h5LeadNatureNewUserTotalAmount`, align: 'center', width: 90,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5NatureUserVOList?.h5LeadNatureNewUserTotalAmount || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '累计充值人数', dataIndex: `h5LeadNatureNewUserTotalAmountNum`, align: 'center', width: 90,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5NatureUserVOList?.h5LeadNatureNewUserTotalAmountNum || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '账面充值金额', dataIndex: `h5LeadNatureAmount`, align: 'center', width: 90,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5NatureUserVOList?.h5LeadNatureAmount || 0} />
        //                     }
        //                 },
        //                 {
        //                     title: '账面充值人数', dataIndex: `h5LeadNatureAmountNum`, align: 'center', width: 90,
        //                     render: (a: string, b: any) => {
        //                         return <Statistic value={b?.h5NatureUserVOList?.h5LeadNatureAmountNum || 0} />
        //                     }
        //                 },
        //             ]
        //         },
        //     ]
        // },
    ]
}

export default columns12