<section class='adminSection adminSection--buttons'>
	{{#eq userType 'account'}}
	<div class='classes__buttons'>
		{{> button style='full' colour='primary' to=addLink content=addContent size='lg' }}
	</div>
	{{/eq}}
</section>

<section class='adminSection classUsers'>
	<div class="adminItem">
		<h2>{{pageTitle}}</h2>
		{{#each users as |user|}}
			{{> classUser userType=../userType user=user }}
		{{/each}}
	</div>
</section>

<script>
	document.querySelectorAll('.classUser i').forEach(elem => {
		elem.addEventListener('click', (e) => {
			const userId = e.path[1].getAttribute('data-uid');
			window.location.href = `${window.location.href}/${userId}/remove`;
		});
	});
</script>
