<script module lang="ts">
	import { defineMeta } from "@storybook/addon-svelte-csf";
	import TagList from "./TagList.svelte";

	const tags = [
		{
			name: "v1.0.0",
			hash: "0123456789abcdef",
			commitHash: "0123456789abcdef",
			when: "2026-07-28T09:00:00Z",
			message: "first stable release"
		},
		{
			name: "v0.9.0",
			hash: "abcdef0123456789",
			commitHash: "abcdef0123456789",
			when: "2026-07-20T09:00:00Z"
		}
	];

	const { Story } = defineMeta({
		title: "Repo/TagList",
		component: TagList,
		tags: ["autodocs"],
		args: { ownerHandle: "dawn", repoName: "tangled", tags }
	});
</script>

<Story name="Latest tag and release history" />
<Story name="Tag without timestamp" args={{ tags: [tags[1]] }} />
<Story name="No tags" args={{ tags: [] }} />
