import { faker } from '@faker-js/faker';
import { Meta, StoryObj } from '@storybook/react';
import { createGroups } from '../../../helpers/storybook';
import { FormGroup } from './FormGroup';

const groups = createGroups({
  Content: ['title', 'isCollapsible', 'defaultExpanded'],
  Styling: ['className'],
});

const meta: Meta<typeof FormGroup> = {
  title: 'Primary Components/Form Elements/FormGroup',
  component: FormGroup,
  argTypes: {
    ...groups,
  },
};
export default meta;

export const Main: StoryObj<typeof FormGroup> = {
  args: {
    title: 'Group Title',
    children: faker.lorem.paragraphs(2),
  },
};
