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

	const { Story } = defineMeta({
		title: "UI/User",
		component: User,
		tags: ["autodocs"],
		argTypes: {
			handle: { control: "text" },
			did: { control: "text" },
			size: {
				control: { type: "inline-radio" },
				options: ["sm", "md", "lg"]
			},
			showImage: { control: "boolean" },
			showText: { control: "boolean" }
		},
		args: {
			handle: "user.tld",
			size: "md",
			showImage: true,
			showText: true
		}
	});
</script>

<Story name="Default" />
<Story name="With avatar" args={{ did: "did:plc:3p7ejjxnufohsygt5vbyxb2i" }} />
<Story name="Image only" args={{ showText: false }} />
<Story name="Text only" args={{ showImage: false }} />

<Story name="Sizes">
	<div class="flex flex-col items-start gap-3">
		<User size="lg" />
		<User size="md" />
		<User size="sm" />
	</div>
</Story>
