/**
 * API Configuration
 * Centralized configuration for API endpoints
 */

export const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';

export const API_CONFIG = {
  // Django API Base URL
  BASE_URL: API_BASE_URL,
  
  // Media files URL (for uploaded images, etc.)
  MEDIA_URL: `${API_BASE_URL}/media`,
  
  // API Endpoints
  ENDPOINTS: {
    CONTACT: '/api/contact',
    CONTACT_SUBMISSIONS: '/api/contact/submissions',
    CONTACT_STATS: '/api/contact/submissions/stats',
    CONTACT_RECENT: '/api/contact/submissions/recent',
    SERVICES: '/api/services',
    SERVICES_FEATURED: '/api/services/featured',
    SERVICES_SEARCH: '/api/services/search',
    SERVICES_STATS: '/api/services/stats',
    SERVICES_CATEGORIES: '/api/services/categories',
  },
  
  // Request timeout (in milliseconds)
  TIMEOUT: 10000,
  
  // Retry configuration
  RETRY: {
    ATTEMPTS: 3,
    DELAY: 1000,
  }
} as const;

export default API_CONFIG;
