<script lang="ts">
	import OverviewTab from '$lib/components/profile/tabs/OverviewTab.svelte';
	import PeopleTab from '$lib/components/profile/tabs/PeopleTab.svelte';
	import RepoListTab from '$lib/components/profile/tabs/RepoListTab.svelte';
	import StarredTab from '$lib/components/profile/tabs/StarredTab.svelte';
	import StringListTab from '$lib/components/profile/tabs/StringListTab.svelte';
	import VouchTab from '$lib/components/profile/tabs/VouchTab.svelte';

	let { data } = $props();
</script>

{#if data.tab === 'overview'}
	<OverviewTab pinned={data.overview.pinned} />
{:else if data.tab === 'repos'}
	<RepoListTab repos={data.repos} />
{:else if data.tab === 'starred'}
	<StarredTab stars={data.stars} />
{:else if data.tab === 'strings'}
	<StringListTab strings={data.strings} />
{:else if data.tab === 'followers'}
	<PeopleTab people={data.people} title="Followers" emptyMessage="No followers yet." />
{:else if data.tab === 'following'}
	<PeopleTab people={data.people} title="Following" emptyMessage="Not following anyone yet." />
{:else if data.tab === 'vouches'}
	<VouchTab vouches={data.vouches} />
{/if}
