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

	const { Story } = defineMeta({
		title: "Repo/Pulls/PullInfoBar",
		component: PullInfoBar,
		tags: ["autodocs"],
		argTypes: {
			state: {
				control: { type: "inline-radio" },
				options: ["open", "merged", "closed", "abandoned"]
			},
			authorHandle: { control: "text" },
			authorDid: { control: "text" },
			createdAt: { control: "text" },
			targetBranch: { control: "text" },
			sourceBranch: { control: "text" },
			sourceRepo: { control: "text" }
		},
		args: {
			state: "open",
			authorHandle: "joshka.net",
			authorDid: "did:plc:3p7ejjxnufohsygt5vbyxb2i",
			createdAt: "2025-06-01T10:30:00Z",
			ownerHandle: "tangled.org",
			repoName: "core",
			targetBranch: "master"
		}
	});
</script>

<Story name="Open" />
<Story name="BranchSource" args={{ sourceBranch: "ref-based-pr" }} />
<Story name="ForkSource" args={{ sourceBranch: "ref-based-pr", sourceRepo: "joshka.net/core" }} />
<Story name="Merged" args={{ state: "merged" }} />
