{"size": 455, "ext": "js", "max_stars_repo_path": "src/helpers/menu-items.js", "max_stars_repo_name": "refugeadvisor/web", "max_stars_repo_stars_event_min_datetime": "2020-07-31T20:16:54.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-15T17:33:39.000Z", "max_issues_repo_path": "src/helpers/menu-items.js", "max_issues_repo_name": "refugeadvisor/web", "max_issues_repo_issues_event_min_datetime": "2018-03-01T15:12:10.000Z", "max_issues_repo_issues_event_max_datetime": "2018-06-12T15:49:20.000Z", "max_forks_repo_path": "src/helpers/menu-items.js", "max_forks_repo_name": "refugeadvisor/web", "max_forks_repo_forks_event_min_datetime": "2018-01-23T22:31:09.000Z", "max_forks_repo_forks_event_max_datetime": "2018-05-17T20:36:03.000Z"}
{"max_stars_count": 3, "max_issues_count": 6, "max_forks_count": 3, "avg_line_length": 20.6818181818, "max_line_length": 55, "alphanum_fraction": 0.6241758242}
// TODO: refactor this
let selectedMenuItem = () => {
	let pathParts = document.location.pathname.split('/');
	let selectedIndex = 0;
	
	if (pathParts.length > 2) {
		if (pathParts[2] === 'article') {
			selectedIndex = -1;
		} else if (pathParts[2] === 'search') {
			selectedIndex = 3;
		} else if (pathParts[2] === 'services') {
			selectedIndex = 2;
		} else {
			selectedIndex = 1;
		}
	}

	return selectedIndex;
};

export default selectedMenuItem;
