import { GlobEnvConfig } from "@/types/utils";

/**
 * 根据不同环境返回不同配置
 * @returns EVN
 */
export function getAppEnvConfig(): Readonly<GlobEnvConfig> {
	// vite 自动会判断环境
	const ENV = import.meta.env as unknown as GlobEnvConfig
	// console.log(ENV, ":ENV");
	const { VITE_GLOB_API_URL, VITE_GLOB_APP_TITLE, VITE_GLOB_BASE_EXPORT_URL, PROD } = ENV
	return {
		PROD,
		VITE_GLOB_API_URL,
		VITE_GLOB_APP_TITLE,
		VITE_GLOB_BASE_EXPORT_URL
	}
}
