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

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

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

export const Default = {} satisfies Story;
