<svelte:options
	customElement={{
		tag: 'eve-user-reputation',
		shadow: 'none'
	}}
/>

<script lang="ts">
	import { getReputationStore } from '$lib/stores/reputation';

	const { pubkey } = $props();
	const repStore = getReputationStore(pubkey);
</script>

<span class="inline-block">
	Reputation:
	{#if $repStore.loading}
		<span class="skeleton w-12 h-[1em] inline-block rounded-full" style="transform: translateY(10%)"
		></span>
	{:else}
		<b>{$repStore.reputation.toFixed(2)}</b>
	{/if}
</span>
