import type { Meta, StoryObj } from "@storybook/react-vite";
import { WizardAuthForm } from "./WizardAuthForm";

const meta: Meta<typeof WizardAuthForm> = {
  title: "League/WizardAuthForm",
  component: WizardAuthForm,
  parameters: { layout: "centered" },
  decorators: [
    (Story) => (
      <div className="w-[420px]">
        <Story />
      </div>
    ),
  ],
  args: {
    setAuthTab: () => {},
    displayName: "",
    setDisplayName: () => {},
    authEmail: "",
    setAuthEmail: () => {},
    authPassword: "",
    setAuthPassword: () => {},
    userTimezone: "America/New_York",
    setUserTimezone: () => {},
    onSocialLogin: () => {},
    submitting: false,
  },
};

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

export const CreateTab: Story = {
  args: { authTab: "create" },
};

export const LoginTab: Story = {
  args: { authTab: "login" },
};

export const Submitting: Story = {
  args: { authTab: "create", submitting: true },
};
