// Single source of truth for the backend server location. Set via
// EXPO_PUBLIC_API_BASE_URL in .env (see .env.example) — Expo inlines
// EXPO_PUBLIC_* vars at build time, so this works in Expo Go and dev
// client builds alike, without needing separate hardcoded values per file.
export const SERVER_ORIGIN =
  process.env.EXPO_PUBLIC_API_BASE_URL || "http://localhost:4000";
export const API_BASE_URL = `${SERVER_ORIGIN}/api`;

// Sign in with Google (@react-native-google-signin/google-signin), no
// Firebase — see docs/GOOGLE_APPLE_SIGNIN_SETUP.md for where these come
// from. Empty until configured; the sign-in button shows a "not configured
// yet" message rather than crashing when these are unset.
/** "Web application" type Client ID — used to obtain an ID token verifiable server-side, and as the audience the server checks against. Required on every platform. */
export const GOOGLE_WEB_CLIENT_ID = process.env.EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID || "";
/** "iOS" type Client ID — required on iOS only. Its reversed form also goes in app.json's google-signin plugin config as `iosUrlScheme`. */
export const GOOGLE_IOS_CLIENT_ID = process.env.EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID || "";

// In-app purchases (expo-iap) — see docs/PLAN_MONETIZATION.md Phase 4. The
// buy-credits product catalog itself is fetched from the server (GET
// /api/purchases/products), not hardcoded here — see EntitlementContext.tsx.
