import { Meta, StoryObj } from "@storybook/nextjs-vite";
import { AnswersList } from "./AnswersList";

/** Reusable AnswersList Component */
const meta: Meta<typeof AnswersList> = {
  title: "Widgets/AnswersList",
  component: AnswersList,
  tags: ["autodocs"],
  args: {
    answers: [
      {
        children: "FEMALE",
        emoji: "👩",
        isCheckbox: true,
        id: "female",
      },
      {
        children: "MALE",
        emoji: "👨",
        id: "male",
      },
      {
        children: "Receding hairline, want to slow its progress",
        id: "without-emoji",
      },
    ],
  },
  argTypes: {},
  render: (args) => {
    return <AnswersList {...args} activeAnswers={[args.answers[0]]} />;
  },
};

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

export const Default = {} satisfies Story;
