import axios from 'axios';
import { api } from './config';
import apiHelper from './api';
import './utils'; // Impor utilities

window.axios = axios;
window.api = apiHelper; // Export API helper globaly

window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
window.axios.defaults.baseURL = api.baseURL;
window.axios.defaults.timeout = api.timeout;
window.axios.defaults.headers = {
    ...window.axios.defaults.headers,
    ...api.headers
};
