<script>
	import { showMenu } from '$lib/store';

	export let id;
	export let name;
	export let active = false;

	function hideMenu() {
		showMenu.update(() => false);
	}
</script>

<li class="rounded-full" class:bg-slate-400={active}>
	<a href="/ch/{id}" on:click={hideMenu}>
		<span class="badge bg-primary-500">#</span>
		<span class="flex-auto">{name}</span>
	</a>
</li>
