<template name="adminFlex">
	<header>
		<div>
			<h4>{{_ "Administration"}}</h4>
		</div>
	</header>
	<div class="content">
		<div class="wrapper">
			<ul>
				<li>
					<a href="{{pathFor 'admin-info'}}" class="admin-link">{{_ "Info"}}</a>
				</li>

				{{#if hasPermission 'run-import'}}
					<li>
						<a href="{{pathFor 'admin-import'}}" class="admin-link">Import</a>
					</li>
				{{/if}}

				{{#if hasPermission 'view-room-administration'}}
					<li>
						<a href="{{pathFor 'admin-rooms'}}" class="admin-link">{{_ "Rooms"}}</a>
					</li>
				{{/if}}

				{{#if hasPermission 'view-user-administration'}}
					<li>
						<a href="{{pathFor 'admin-users'}}" class="admin-link">{{_ "Users"}}</a>
					</li>
				{{/if}}

				{{#each adminBoxOptions}}
					{{#if permissionGranted}}
						<li>
							<a href="{{pathFor href}}" class="admin-link">{{label}}</a>
						</li>
					{{/if}}
				{{/each}}

				{{#if hasPermission 'view-privileged-setting'}}
					<h3 class="add-room">
						{{_ "Settings"}}
					</h3>

					<li>
						<input type="text" name="settings-search" placeholder="{{_ 'Search'}}">
					</li>

					{{#each groups}}
					<li>
						<a href="{{pathFor 'admin' group=_id}}" class="admin-link">{{label}}</a>
					</li>
					{{/each}}
				{{/if}}
			</ul>
		</div>
	</div>
</template>
