const PRO_ANALYTICS_BASE_URL = "https://proapi.banlv-ai.com";
const PRODUCTION_ANALYTICS_BASE_URL = "https://api.banlv-ai.com";

export function getBehaviorAnalyticsBaseUrl(
  appEnv = process.env.NEXT_PUBLIC_APP_ENV,
): string {
  return appEnv === "production"
    ? PRODUCTION_ANALYTICS_BASE_URL
    : PRO_ANALYTICS_BASE_URL;
}

export function getBehaviorAnalyticsEndpoint(appEnv?: string): string {
  return `${getBehaviorAnalyticsBaseUrl(appEnv)}/api/behavior/events`;
}

export function getBehaviorAnalyticsScriptUrl(appEnv?: string): string {
  return `${getBehaviorAnalyticsBaseUrl(appEnv)}/js/cozsweet-payment-analytics.js`;
}
