import React from 'react';
import {
  Title,
  Description,
  Primary,
  PRIMARY_STORY,
  ArgsTable,
} from '@storybook/addon-docs/blocks';

import Content from '.';
import { blockquote } from '~tests/factories/modules/content.factory';

export default {
  title: 'Theme/Modules/Content/Common/Blockquotes',
  component: Content,
  argTypes: {
    module: {
      name: 'module',
      type: { name: 'object', required: false },
      defaultValue: '',
      description: 'The module data object',
      table: {
        type: { summary: 'object' },
        defaultValue: { summary: '' },
      },
    },
  },
  parameters: {
    docs: {
      description: {
        component:
          'The content component displays content received from Hercules and replaces all images within the data with the lazy image component.',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

const TemplateContentImage = (args) => <Content {...args} />;

export const blockquotes = TemplateContentImage.bind({});
blockquotes.story = {
  args: {
    module: blockquote,
  },
};
