import type { Meta, StoryObj } from "@storybook/react";
import { SingleSelectField } from "./SingleSelectField";

const meta: Meta<typeof SingleSelectField> = {
	title: "Widgets/Onboarding/Fields/SingleSelectField",
	component: SingleSelectField,
	parameters: {
		layout: "centered",
	},
	tags: ["autodocs"],
	argTypes: {
		value: { control: "text" },
		onChange: { action: "changed" },
		disabled: { control: "boolean" },
	},
};

export default meta;
type Story = StoryObj<typeof meta>;

const defaultOptions = [
	{ value: "startup", label: "Startup (1-10 employees)" },
	{ value: "small", label: "Small Business (11-50 employees)" },
	{ value: "medium", label: "Medium Business (51-200 employees)" },
	{ value: "enterprise", label: "Enterprise (200+ employees)" },
];

export const Default: Story = {
	args: {
		options: defaultOptions,
		value: "",
		ariaLabel: "Select company size",
	},
};

export const WithValue: Story = {
	args: {
		options: defaultOptions,
		value: "small",
		ariaLabel: "Select company size",
	},
};

export const Disabled: Story = {
	args: {
		options: defaultOptions,
		value: "medium",
		ariaLabel: "Select company size",
		disabled: true,
	},
};
