const AuthUtils = {
    getToken() {
        return localStorage.getItem('token');
    },

    getAuthHeaders() {
        const token = this.getToken();
        return {
            'Content-Type': 'application/json',
            'Authorization': `Bearer ${token}`
        };
    },

    getSimpleAuthHeaders() {
        const token = this.getToken();
        return {
            'Authorization': `Bearer ${token}`
        };
    },

    isAuthenticated() {
        return !!this.getToken();
    }
};

window.AuthUtils = AuthUtils;