export const API_BASE = (() => {
  const configured = process.env.NEXT_PUBLIC_API_URL;
  // During SSG/build in Node.js, relative paths like /api/v1 won't resolve
  // Use the local backend directly (assumes backend runs on port 4000 during build)
  if (typeof window === 'undefined' && configured?.startsWith('/')) {
    return 'http://localhost:4000/api/v1';
  }
  return configured || '/api/v1';
})();

export const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://yuzhiran.com';

export const SITE_NAME = process.env.NEXT_PUBLIC_SITE_NAME || '宇之然 AI';

export const WX_APPID = process.env.NEXT_PUBLIC_WX_APPID || '';
