<commit_before><?php

Menu::create('admin.left', function ($menu)
{
	$menu->route('admin.index', 'Home');
	$menu->dropdown('Posts', function ($sub)
	{
		$sub->route('admin.posts.index', 'All Posts');
		$sub->route('admin.posts.create', 'Add New');
	});
	$menu->dropdown('Pages', function ($sub)
	{
		$sub->route('admin.posts.index', 'All Pages', ['type' => 'page']);
		$sub->route('admin.posts.create', 'Add New', ['type' => 'page']);
	});
	$menu->dropdown('Categories', function ($sub)
	{
		$sub->route('admin.categories.index', 'All Categories');
		$sub->route('admin.categories.create', 'Add New');
	});
	$menu->dropdown('Tags', function ($sub)
	{
		$sub->route('admin.tags.index', 'All Tags');
		$sub->route('admin.tags.create', 'Add New');
	});
});

Menu::create('admin.right', function ($menu)
{
	$menu->style('navbar-right');
	$menu->url('/', 'Visit Site', ['target' => '_blank']);
	$menu->dropdown('Account', function ($sub)<commit_msg>Add 'active' & 'inactive' state<commit_after><?php

Menu::create('admin.left', function ($menu)
{
	$menu->route('admin.index', 'Home');
	$menu->dropdown('Posts', function ($sub)
	{
		$sub->route('admin.posts.index', 'All Posts', [], [
			'inactive' => function ()
			{
				return URL::full() == route('admin.posts.index', ['type' => 'page']);
			}
		]);
		$sub->route('admin.posts.create', 'Add New', [], ['inactive' => function ()
			{
				return URL::full() == route('admin.posts.create', ['type' => 'page']);
			}]);
	}, [
			'inactive' => function ()
			{
				return URL::full() == route('admin.posts.index', ['type' => 'page']);
			}
		]);
	$menu->dropdown('Pages', function ($sub)
	{
		$sub->route('admin.posts.index', 'All Pages', ['type' => 'page'], [
			'active' => function ()
			{
				return URL::full() == route('admin.posts.index', ['type' => 'page']);
			}
		]);
		$sub->route('admin.posts.create', 'Add New', ['type' => 'page'], ['active' => function ()
			{
				return URL::full() == route('admin.posts.create', ['type' => 'page']);
			}]);
	}, ['active' => function () {
		return URL::full() == route('admin.posts.index', ['type' => 'page']) || 
		URL::full() == route('admin.posts.create', ['type' => 'page']) ;
	}]);
	$menu->dropdown('Categories', function ($sub)
	{
		$sub->route('admin.categories.index', 'All Categories');
		$sub->route('admin.categories.create', 'Add New');
	});
	$menu->dropdown('Tags', function ($sub)
	{
		$sub->route('admin.tags.index', 'All Tags');
		$sub->route('admin.tags.create', 'Add New');
	});
});

Menu::create('admin.right', function ($menu)
{
	$menu->style('navbar-right');
	$menu->url('/', 'Visit Site', ['target' => '_blank']);
	$menu->dropdown('Account', function ($sub)
{'fraction_non_alphanumeric': 0.281437125748503, 'fraction_numerical': 0.0, 'mean_word_length': 4.711538461538462, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 54, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1639628', 'n_tokens_mistral': 999, 'n_tokens_neox': 924, 'n_words': 164}