// src/config.ts

/**
 * A centralized configuration module that reads environment variables
 * from `import.meta.env`. This provides a single, explicit place to manage
 * environment-specific settings and makes mocking for tests significantly easier.
 */
const config = {
  app: {
    version: import.meta.env.VITE_APP_VERSION,
    commitMessage: import.meta.env.VITE_APP_COMMIT_MESSAGE,
    commitUrl: import.meta.env.VITE_APP_COMMIT_URL,
  },
  google: {
    mapsEmbedApiKey: import.meta.env.VITE_GOOGLE_MAPS_EMBED_API_KEY,
  },
  /**
   * Sentry/Bugsink error tracking configuration (ADR-015).
   * Uses VITE_ prefix for client-side environment variables.
   */
  sentry: {
    dsn: import.meta.env.VITE_SENTRY_DSN,
    environment: import.meta.env.VITE_SENTRY_ENVIRONMENT || import.meta.env.MODE,
    debug: import.meta.env.VITE_SENTRY_DEBUG === 'true',
    enabled: import.meta.env.VITE_SENTRY_ENABLED !== 'false',
  },
};

export default config;
