<script>
	import Upload from '@lucide/svelte/icons/upload';
	import { Button } from '$lib/components/ui/button/index.js';
	import BooksUpload from '$lib/components/forms/books-upload.svelte';
	import { getBookOperationsState } from '$lib/state/bookOperations.svelte';

	const bookOps = getBookOperationsState();
</script>

<!-- Labelled, so no tooltip: the button already says what it does. -->
<Button onclick={() => (bookOps.uploadDialogOpen = true)}>
	<Upload class="size-4" />
	Upload
</Button>

<BooksUpload bind:open={bookOps.uploadDialogOpen} />
