import { PageStatusEnum, PageTypeEnum, SourceTypeEnum } from "@/services/launchAdq/enum"
import { Badge } from "antd"
import React from "react"
let columns = () => [
    {
        title: '落地页ID',
        dataIndex: 'pageId',
        key: 'pageId',
        align: 'center',
        width: 100,
        render: (a: string) => {
            return <a>{a}</a>
        }
    },
    {
        title: '落地页名称',
        dataIndex: 'pageName',
        key: 'pageName',
        ellipsis: true
    },
    {
        title: '落地页类型',
        dataIndex: 'pageType',
        key: 'pageType',
        align: 'center',
        width: 120,
        render: (a: string) => {
            return PageTypeEnum[a]
        }
    },
    {
        title: '落地页状态',
        dataIndex: 'pageStatus',
        key: 'pageStatus',
        align: 'center',
        width: 90,
        render: (a: string | number) => {
            return <Badge status={a === 'NORMAL' ? "processing" : "error"} text={PageStatusEnum[a]} />
        }
    },
    {
        title: '配置来源',
        dataIndex: 'sourceType',
        key: 'sourceType',
        align: 'center',
        width: 130,
        render: (a: any, b: any) => {
            return SourceTypeEnum[a]
        }
    },
    {
        title: '创建时间',
        dataIndex: 'createdTime',
        key: 'createdTime',
        align: 'center',
        width: 145,
    },
]

export default columns