<script lang="ts">
	import { dumpUser } from '$lib/AniList/user';
	import RateLimited from '$lib/Error/RateLimited.svelte';
	import InputTemplate from './InputTemplate.svelte';

	let submission = '';
</script>

<!-- svelte-ignore missing-declaration -->
<InputTemplate field="Username" bind:submission event="Dump User" submitText="Dump">
	{#await dumpUser(submission)}
		Loading user ... 50%
	{:then dump}
		<pre style="margin: 0;">{JSON.stringify(dump, null, 2)}</pre>
	{:catch}
		<RateLimited type="User" list={false} />
	{/await}
</InputTemplate>
