<script lang="ts">
	import { getReaderContext } from '$lib/Reader.svelte';
	import { accelerator } from '$lib/Shortcuts';

	const reader = getReaderContext();

	let title = $derived(`${reader.sidebar ? 'Hide' : 'Show'} menu`);
</script>

<button
	type="button"
	class="btn-transparent hidden xl:flex"
	{title}
	aria-label={title}
	onclick={() => (reader.sidebar = !reader.sidebar)}
	use:accelerator={'z'}
>
	<span class="icon-lg icon-[material-symbols--dock-to-right]"></span>
</button>
