<script lang="ts">
	import { getResultState } from '$lib/Utils';
	import Spinner from './Spinner.svelte';

	export let result;
	$: state = getResultState($result);
</script>

{#if state.fetching}
	<Spinner />
{:else}
	<p>{state.message}</p>
{/if}
