import React from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import {
  Title,
  Description,
  Primary,
  PRIMARY_STORY,
  ArgsTable,
} from '@storybook/addon-docs/blocks';

import { getModules } from '~tests/factories/modules/footer-navigation.factory';
import FooterNavigation from '.';

export default {
  title: 'Theme/Layout/Footer Navigation',
  component: FooterNavigation,
  argTypes: {
    section: {
      name: 'section',
      type: { name: 'object', required: true },
      defaultValue: '',
      description: 'Section object containing a menu module.',
      table: {
        type: { summary: 'object' },
        defaultValue: { summary: '' },
      },
    },
  },
  parameters: {
    docs: {
      description: {
        component:
          'A component that displays a list of links for use on Mobile only as component fixed to the bottom of the screen.',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

const Template = (args) => <FooterNavigation {...args} />;
export const TemplateOne = Template.bind({});
TemplateOne.args = {
  section: {
    style: 'template_one',
    modules: getModules(),
  },
  isStorybook: true,
};

export const TemplateTwo = Template.bind({});
TemplateTwo.args = {
  section: {
    style: 'template_two',
    modules: getModules(),
  },
  isStorybook: true,
};

export const TemplateThree = Template.bind({});
TemplateThree.args = {
  section: {
    style: 'template_three',
    modules: getModules(),
  },
  isStorybook: true,
};
