import { createHttpClient } from '@goodgo/http-client';

// EN: Get API base URL from environment or use default
// VI: Lấy API base URL từ environment hoặc sử dụng mặc định
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost/api/v1';

/**
 * EN: HTTP client instance configured for API calls
 * VI: Instance HTTP client đã cấu hình cho API calls
 */
export const apiClient = createHttpClient({
  baseURL: API_URL,
  timeout: 30000, // EN: 30 second timeout / VI: Timeout 30 giây
});
