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

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

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

export const Default: Story = {
  args: {
    open: true,
    onOpenChange: () => {},
    pickNumber: 5,
    picksCount: 3,
    isRollingBack: false,
    onConfirm: () => {},
  },
};

export const SinglePick: Story = {
  args: {
    open: true,
    onOpenChange: () => {},
    pickNumber: 7,
    picksCount: 1,
    isRollingBack: false,
    onConfirm: () => {},
  },
};

export const RollingBack: Story = {
  name: "Rolling Back...",
  args: {
    open: true,
    onOpenChange: () => {},
    pickNumber: 3,
    picksCount: 5,
    isRollingBack: true,
    onConfirm: () => {},
  },
};

export const Closed: Story = {
  args: {
    open: false,
    onOpenChange: () => {},
    pickNumber: null,
    picksCount: 0,
    isRollingBack: false,
    onConfirm: () => {},
  },
};
