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

const groups = createGroups({
  Behavior: ['inlineMode', 'id', 'dataTestFieldType', 'stickyLabel'],
  Content: ['label', 'error', 'tooltipContent', 'children'],
  Styling: ['className', 'minHeight'],
});

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

export const Main: StoryObj<typeof FormElementContainer> = {
  args: {
    label: 'Name',
    tooltipContent: faker.lorem.paragraph(2),
    children: <p>Add your custom control as child.</p>,
  },
};
