// catan.ts
export const cc = {
	_decorator: {
		ccclass: undefined as any,
	},

	log(msg: string | any, ...subst: any[]) {
		if ((window as any).CC_DEV) {
			console.log(msg, ...subst);
		}
	},

	warn(msg: string | any, ...subst: any[]) {
		if ((window as any).CC_DEV) {
			console.warn(msg, ...subst);
		}
	},

	error(msg: string | any, ...subst: any[]) {
		if ((window as any).CC_DEV) {
			console.error(msg, ...subst);
		}
	},
};

// 將 cc 掛到全域
(window as any).cc = cc;
window["CC_DEV"] = window["CC_DEBUG"] = import.meta.env.DEV;

// 全域常數
export const CC_EDITOR = false;
export const CC_PREVIEW = false;
export const CC_DEV = true;
export const CC_DEBUG = false;
export const CC_BUILD = false;
export const CC_JSB = false;
export const CC_RUNTIME = true;
export const CC_TEST = false;
export const CC_WECHATGAME = false;