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

import SingleStackedBarChart from '.';

const meta: Meta<typeof SingleStackedBarChart> = {
  component: SingleStackedBarChart,
  title: 'Composed Components/Charts/SingleStackedBarChart',
  tags: ['autodocs'],
  args: {
    data: [
      { label: 'Green', value: 10, color: 'oklch(79.2% 0.209 151.711)' },
      { label: 'Blue', value: 20, color: 'oklch(70.7% 0.165 254.624)' },
      { label: 'Red', value: 30, color: 'oklch(63.7% 0.237 25.331)' },
    ],
    height: 50,
    showTooltipPercentage: true,
  },
};

export default meta;

type Story = StoryObj<typeof SingleStackedBarChart>;

export const Default: Story = {
  render: args => {
    return <SingleStackedBarChart {...args} />;
  },
};
