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

const groups = createGroups({
  Behavior: ['inlineMode', 'id'],
  Content: ['label', 'tooltipContent', 'value', 'trueLabel', 'falseLabel'],
  Styling: ['className'],
});

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

export const Main: StoryObj<typeof BooleanViewField> = {
  args: {
    label: 'Status',
    value: true,
    trueLabel: 'Enabled',
    falseLabel: 'Disabled',
    tooltipContent: faker.lorem.paragraph(2),
  },
};
