export type UmamiRuntimeConfig = {
	appName: string;
	site: string;
	server: string;
	appVersion: string;
	umamiHost: string;
	umamiWebsiteId: string;
};

export const umamiConfig: UmamiRuntimeConfig = {
	appName: process.env.APP_NAME ?? "LST",
	site: process.env.URL ?? "unknown",
	server: process.env.PROD_PLANT_TOKEN ?? "unknown", // could also be server name based on our setup.
	appVersion: process.env.NODE_ENV ?? "dev",
	umamiHost: process.env.UMAMI_HOST ?? "",
	umamiWebsiteId: process.env.UMAMI_WEBSITE_ID ?? "",
};

export function isUmamiEnabled() {
	return Boolean(umamiConfig.umamiHost && umamiConfig.umamiWebsiteId);
}
