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

const meta: Meta<typeof OnboardingFooter> = {
	title: "Widgets/Onboarding/Layouts/OnboardingFooter",
	component: OnboardingFooter,
	parameters: {
		layout: "centered",
	},
	tags: ["autodocs"],
	argTypes: {
		onSubmit: { action: "submit" },
		onBack: { action: "back" },
	},
};

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

export const Default: Story = {
	args: {
		submitText: "Continue",
	},
};

export const Loading: Story = {
	args: {
		submitText: "Continue",
		loadingText: "Saving...",
		isLoading: true,
	},
};

export const Disabled: Story = {
	args: {
		submitText: "Continue",
		isDisabled: true,
	},
};

export const WithBackButton: Story = {
	args: {
		submitText: "Continue",
		showBack: true,
		backText: "Previous",
	},
};

export const CustomLabels: Story = {
	args: {
		submitText: "Complete Setup",
		loadingText: "Finishing up...",
		showBack: true,
		backText: "Go Back",
	},
};

export const FinalStep: Story = {
	args: {
		submitText: "Finish & Launch",
		showBack: true,
		backText: "Review",
	},
};
