<section class='testPage'>
	<section class='adminSection adminSection--buttons'>
		{{#eq userType 'account'}}
		<div class='classes__buttons'>
			{{> button style='full' colour='primary' to=deleteLink content='Delete Test' size='lg'}}
		</div>
		{{/eq}}
	</section>
	<div class='adminSection'>
		<div class='adminItem'>
			<h2>Test Overview - {{ testName }}</h2>
			<div>
				{{#with class}}
				<div>Class: <a href='/admin/class/{{id}}' class='hl'>{{name}}</a></div>
				{{/with}}
				<div>
				Subject: <span class='hl'>{{subject}}</span>
				</div>
				<div>
				Maximum mark: <span class='hl'>{{maxMark}}</span>
				</div>
			</div>
		</div>
	</div>
	<div class='adminSection'>
		<div class='adminItem'>
			<div class="adminItem__title">
				<h2>
					{{#eq userType 'account'}}
						Results
					{{else}}
						Result
					{{/eq}}
				</h2>
				{{#eq userType 'account'}}
				{{> button style='full' colour='primary' to=resultsLink content='Manage results'}}
				{{/eq}}
			</div>
			<div>
				{{#if testResults.length}}
					{{#each testResults}}
						{{> testResult result=this userType=../userType edit=false }}
					{{/each}}
				{{else}}
					{{#eq userType 'account'}}
						You have not submitted any results yet
					{{else}}
						Your test result has not been submitted yet
					{{/eq}}
				{{/if}}
			</div>
		</div>
	</div>
	<div class='adminSection'>
		<div class='adminItem adminStats'>
			<div class='adminItem__title'>
				<h2>Statistics and Reports</h2>
				{{> button style='full' colour='primary' to=reportsLink content='View All'}}
			</div>
			<div class='adminStats__stats'>
				{{#each stats}}
					{{> adminStat value=value text=text }}
				{{/each}}
			</div>
			<div class='adminStats__graphs'>
				{{> graph }}
				{{> graph }}
			</div>
		</div>
	</div>
</section>
