<script lang="ts">
	import Button from "./Button.svelte";

	interface Props {
		loading?: boolean;
		failed?: boolean;
		onclick: () => void;
		class?: string;
	}

	let { loading = false, failed = false, onclick, class: className }: Props = $props();
</script>

<div class="flex justify-center pt-4 {className ?? ''}">
	<Button variant="ghost" {loading} {onclick}>
		{failed ? "couldn't load more, retry?" : "load more"}
	</Button>
</div>
