/**
 * API Configuration
 *
 * Configurable base URL for development and production environments.
 */

function getApiBaseUrl(): string {
  // Use environment variable if set
  if (process.env.EXPO_PUBLIC_API_BASE_URL) {
    return process.env.EXPO_PUBLIC_API_BASE_URL;
  }

  // Development fallback
  if (__DEV__) {
    return 'http://lvh.me:8000';
  }

  // Production default
  return 'https://smoothschedule.com';
}

export const API_BASE_URL = getApiBaseUrl();
export const API_MOBILE_URL = `${API_BASE_URL}/mobile`;
