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

const meta: Meta<typeof CommissionerAutodraftDialog> = {
  title: "Draft/CommissionerAutodraftDialog",
  component: CommissionerAutodraftDialog,
  parameters: {
    layout: "padded",
  },
};

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

export const AutodraftOff: Story = {
  args: {
    open: true,
    onOpenChange: () => {},
    teamId: "team-1",
    teamName: "Thunder Hawks",
    seasonId: "season-1",
    isEnabled: false,
    mode: "next_pick",
    queueOnly: false,
    onUpdate: () => {},
  },
};

export const AutodraftNextQueue: Story = {
  args: {
    open: true,
    onOpenChange: () => {},
    teamId: "team-1",
    teamName: "Shadow Hawks",
    seasonId: "season-1",
    isEnabled: true,
    mode: "next_pick",
    queueOnly: true,
    onUpdate: () => {},
  },
};

export const AutodraftAllPicks: Story = {
  args: {
    open: true,
    onOpenChange: () => {},
    teamId: "team-2",
    teamName: "Iron Eagles",
    seasonId: "season-1",
    isEnabled: true,
    mode: "while_on",
    queueOnly: false,
    onUpdate: () => {},
  },
};

export const NoTeamSelected: Story = {
  name: "No Team Selected (body hidden)",
  args: {
    open: true,
    onOpenChange: () => {},
    teamId: null,
    teamName: undefined,
    seasonId: "season-1",
    isEnabled: false,
    mode: "next_pick",
    queueOnly: false,
    onUpdate: () => {},
  },
};
