import { Badge } from "antd";
import React from "react";

/** 广告状态 */
export enum ADGROUP_STATUS {
    ADGROUP_STATUS_FROZEN = '已冻结',
    ADGROUP_STATUS_SUSPEND = '暂停中',
    ADGROUP_STATUS_NOT_IN_DELIVERY_TIME = '广告未到投放时间',
    ADGROUP_STATUS_ACTIVE = '投放中',
    ADGROUP_STATUS_DELETED = '已删除',
    ADGROUP_STATUS_ACCOUNT_BALANCE_NOT_ENOUGH = '账户余额不足',
    ADGROUP_STATUS_DAILY_BUDGET_REACHED = '广告达到日预算上限',
    ADGROUP_STATUS_PARTIAL_ACTIVE = '部分投放中',
    ADGROUP_STATUS_CREATIVE_STATUS_PENDING = '创意未投放',
    ADGROUP_STATUS_CREATIVE_EMPTY = '创意准备中',
    ADGROUP_STATUS_JOINT_BUDGET_REACHED = '广告被暂停（联合预算达上限）',
    ADGROUP_STATUS_TOTAL_BUDGET_REACHED = '广告达到总预算上限'
}

/** 投放模式 */
export enum DELIVERY_MODE {
    DELIVERY_MODE_COMPONENT = '组件化创意',
    DELIVERY_MODE_CUSTOMIZE = '自定义创意'
}

/** 创意形式匹配方式 */
export enum DYNAMIC_CREATIVE_TYPE {
    DYNAMIC_CREATIVE_TYPE_COMMON = '手动指定',
    DYNAMIC_CREATIVE_TYPE_PROGRAM = '自动匹配'
}


/** 创意形式匹配方式 */
export enum DYNAMIC_CREATIVE_STATUS {
    DYNAMIC_CREATIVE_STATUS_PENDING = '审核中',
    DYNAMIC_CREATIVE_STATUS_DENIED = '审核不通过',
    DYNAMIC_CREATIVE_STATUS_ACTIVE = '投放中',
    DYNAMIC_CREATIVE_STATUS_SUSPEND = '暂停',
    DYNAMIC_CREATIVE_STATUS_PREPARE_FAILED = '创意准备失败',
    DYNAMIC_CREATIVE_STATUS_DELETED = '已删除',
    DYNAMIC_CREATIVE_STATUS_CREATING = '创意准备中',
}

export const AD_STATUS = {
    AD_STATUS_NORMAL: <Badge status="success" text='有效' />,
    AD_STATUS_SUSPEND: <Badge status="warning" text='暂停' />,
}

/** 一键起量 */
export enum AUTO_ACQUISTION_STATUS {
    AUTO_ACQUISTION_STATUS_UNKNOW="未开启一键起量功能",
    AUTO_ACQUISTION_STATUS_PENDING="开启一键起量，探索中",
    AUTO_ACQUISTION_STATUS_END_LESS_THAN_24H="起量完成(探索结束，预算花完，功能开启后未满 24h)",
    AUTO_ACQUISTION_STATUS_END_MORE_THAN_24H="起量完成(探索结束，预算花完，功能开启后已满 24h)",
    AUTO_ACQUISTION_STATUS_COMPLETED="起量结束(探索结束，距离广告开启已满 6h，但预算未花完（实际花费＜起量预算*90%）)",
    AUTO_ACQUISTION_STATUS_SUSPEND_ON_LEARNING_FAIL="起量中止(探索过程中，因广告起量情况太差，从而探索中止)",
    AUTO_ACQUISTION_STATUS_SUSPEND_ON_PLAYING_FAIL="起量中止(探索过程中，因广告无法播放，从而起量中止（包括广告主动或被动下线或 timeset 不连续）)",
    AUTO_ACQUISTION_STATUS_ADVERTISER_CLOSED="广告主主动关闭一键起量功能"
}