/**
 * Base URL configuration
 * 
 * Note: These values are loaded from the server when the page loads.
 * See the <script> tag in the HTML head.
 */

// Get base URL from the global window object, which is set in app.blade.php
const baseURL = window.BASE_URL || '';

/**
 * API configuration
 */
const api = {
    baseURL: `${baseURL}/api`,
    timeout: 30000, // 30 seconds
    headers: {
        'Content-Type': 'application/json',
        'X-Requested-With': 'XMLHttpRequest'
    }
};

export { baseURL, api }; 