import type { Meta, StoryObj } from '@storybook/react';

import { RadioGroupWithBadges } from './RadioGroupWithBadges';

const meta: Meta<typeof RadioGroupWithBadges> = {
  title: 'Components/RadioGroupWithBadges',
  component: RadioGroupWithBadges,
  tags: ['autodocs'],
};

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

const defaultOptions = [
  { value: 'monthly', label: 'Monthly' },
  {
    value: 'yearly',
    label: 'Yearly',
    badge: {
      text: 'Save 20%',
      icon: null,
      className: 'bg-white/20 text-white/90',
    },
  },
];

export const Vertical: Story = {
  args: {
    options: defaultOptions,
    orientation: 'vertical',
    defaultValue: 'option1',
  },
};

export const Horizontal: Story = {
  args: {
    options: defaultOptions,
    orientation: 'horizontal',
    defaultValue: 'option1',
  },
};

export const WithoutBadges: Story = {
  args: {
    options: [
      { value: 'simple1', label: 'Simple Option 1' },
      { value: 'simple2', label: 'Simple Option 2' },
      { value: 'simple3', label: 'Simple Option 3' },
    ],
    orientation: 'vertical',
    defaultValue: 'simple1',
  },
};
