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

/** Reusable CircularProgressbarsList Component */
const meta: Meta<typeof CircularProgressbarsList> = {
  title: "Widgets/CircularProgressbarsList",
  component: CircularProgressbarsList,
  tags: ["autodocs"],
  args: {
    progressbarItems: [
      {
        processing: {
          title: { children: "Анализ твоих ответов" },
          text: {
            children: "Processing...",
          },
        },
        completed: {
          title: { children: "Анализ твоих ответов" },
          text: {
            children: "Complete",
          },
        },
      },
      {
        processing: {
          title: { children: "Portrait of the Soulmate" },
          text: {
            children: "Processing...",
          },
        },
        completed: {
          title: { children: "Portrait of the Soulmate" },
          text: {
            children: "Complete",
          },
        },
      },
      {
        processing: {
          title: { children: "Portrait of the Soulmate" },
          text: {
            children: "Processing...",
          },
        },
        completed: {
          title: { children: "Connection Insights" },
          text: {
            children: "Complete",
          },
        },
      },
    ],
    onAnimationEnd: fn(),
  },
  argTypes: {},
};

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

export const Default = {} satisfies Story;
