/* eslint-disable no-nested-ternary */
/**
 * 环境模式枚举
 */
export var Env;
(function (Env) {
    Env["Prod"] = "prod";
    Env["Pre"] = "pre";
    Env["Local"] = "local";
})(Env || (Env = {}));
/**
 * 获取不同环境的主机配置
 */
export const getHost = () => {
    return {
        [Env.Local]: {
            host: 'https://mocks.alibaba-inc.com/mock/lv3qt54d',
        },
        [Env.Pre]: {
            host: 'https://pre-cn-x-gateway.cainiao.com',
            // host: window.OSB_securityDomain,
        },
        [Env.Prod]: {
            host: 'https://cn-x-gateway.cainiao.com',
            // host: window.OSB_securityDomain,
        },
    };
};
/**
 * 当前环境
 */
export const ENV_MODE = location.hostname.indexOf('localhost') !== -1 || location.hostname.indexOf('127.0.0.1') !== -1
    ? Env.Local
    : location.hostname.indexOf('pre-') !== -1 ||
        location.hostname.indexOf('.test') !== -1 ||
        location.hostname.indexOf('daily-') !== -1 ||
        location.hostname.indexOf('dev.g') !== -1
        ? Env.Pre
        : Env.Prod;
/**
 * 调试用的默认值（可以后续改为从 props 传入）
 */
export const DEFAULT_BASE_INFO_CONTEXT = {
    componentVersion: '1.2.37',
    operator: '492880',
    version: 'ENTITY_EXTRACTION',
};
