/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import {
  Title,
  Description,
  Primary,
  PRIMARY_STORY,
  ArgsTable,
} from '@storybook/addon-docs/blocks';
import getOperatorData from '../../../../../tests/factories/pages/operator.factory';
import InfoGrid from '.';

const pageData = getOperatorData();

export default {
  title: 'Theme/Modules/Template Blocks/Info Grid/Template Two',
  component: InfoGrid,
  argTypes: {
    page: {
      name: 'page',
      type: { name: 'object', required: true },
      description: 'Page object',
      defaultValue: pageData,
    },
    showSeeMoreButton: {
      name: 'showSeeMoreButton',
      type: { name: 'boolean', required: false },
      defaultValue: true,
      description: 'Switch to template two',
    },
    showInitial: {
      name: 'showInitial',
      type: { name: 'number', required: false },
      defaultValue: 6,
      description: 'Initial number of items to show. Only on template two',
    },
  },
  parameters: {
    docs: {
      description: {
        component:
          'A component that gets an object of data and generates divs including keys/values. This is the Default view',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

const Template = (args) => <InfoGrid {...args} />;

export const Default = Template.bind({});
Default.args = {};
