<script module lang="ts">
	import { defineMeta } from "@storybook/addon-svelte-csf";
	import MockAuthProvider from "$lib/components/testing/MockAuthProvider.svelte";
	import TimelineFollowEvent from "./TimelineFollowEvent.svelte";
	import type { FollowEvent } from "$lib/api/lexicons/types/sh/tangled/feed/getTimeline";

	const event = {
		$type: "sh.tangled.feed.getTimeline#followEvent",
		cid: "bafyreib2",
		uri: "at://did:plc:oky5czdrnfjpqslsw2a5iclo/sh.tangled.graph.follow/3l",
		actor: { did: "did:plc:oky5czdrnfjpqslsw2a5iclo", handle: "alice.tngl.sh" },
		subject: {
			did: "did:plc:3p7ejjxnufohsygt5vbyxb2i",
			handle: "joshka.net",
			description: "Rust, TUIs, and the occasional git plumbing yak-shave.",
			followersCount: 128,
			followsCount: 87
		}
	} as unknown as FollowEvent;

	const { Story } = defineMeta({
		title: "Timeline/TimelineFollowEvent",
		component: TimelineFollowEvent,
		tags: ["autodocs"],
		args: {
			event,
			eventAt: "2025-06-02T09:00:00Z"
		}
	});
</script>

<Story name="Default">
	{#snippet template(args)}
		<MockAuthProvider>
			<TimelineFollowEvent {...args} />
		</MockAuthProvider>
	{/snippet}
</Story>
