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

	const reader = getReaderContext();
</script>

<button
	type="button"
	class="btn floating"
	title="Close reader"
	on:click={() => {
		$reader.visible = false;
		$reader.sidebar = false;
	}}
	use:accelerator={'Escape'}
>
	<span class="icon-lg icon-[material-symbols--close]" />
</button>
