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

	const entries = [
		{ name: "components", kind: "directory" as const, size: 0 },
		{ name: "index.ts", kind: "file" as const, size: 128 },
		{ name: "package.json", kind: "file" as const, size: 512 }
	];

	const { Story } = defineMeta({
		title: "Repo/TreeHeader",
		component: TreeHeader,
		tags: ["autodocs"],
		args: {
			ownerHandle: "dawn",
			repoName: "tangled",
			ref: "main",
			path: "src/lib",
			entries
		}
	});
</script>

<Story name="Nested path with folder and file counts" />
<Story name="Repository root" args={{ path: "", entries: entries.slice(0, 2) }} />
<Story name="Files only" args={{ entries: entries.slice(1) }} />
