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 FooterNavigation from '.';

export default {
  title: 'Theme/Organisms/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 Default = Template.bind({});
Default.args = {
  section: {
    modules: [
      {
        menu_id: 353,
        menu_short_code: 'footer_navigation',
        module_value_id: 167244,
        name: 'menu',
        title: 'Footer Navigation',
        short_code: 'footer_navigation',
        language: 'en',
        market: 'za_en',
        children: [
          {
            id: 5503,
            page_id: null,
            title: 'R500 Free',
            nofollow: false,
            value: '/za_en/visit/footerNav/zar_casino',
            image: 'zar-casinopng.webp',
            image_object: {
              width: '80',
              height: '80',
              url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/zar-casinopng.webp',
              filename: 'zar-casinopng.webp',
            },
          },
          {
            id: 5501,
            page_id: null,
            title: 'R350 Free',
            nofollow: false,
            value: '/za_en/visit/footerNav/springbok_casino',
            image: 'springbok-2png.webp',
            image_object: {
              width: '80',
              height: '80',
              url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/springbok-2png.webp',
              filename: 'springbok-2png.webp',
            },
          },
          {
            id: 5613,
            page_id: null,
            title: 'R300 Free',
            nofollow: false,
            value: '/za_en/visit/footerNav/rich_casino',
            image: 'rich-casinopng.webp',
            image_object: {
              width: '80',
              height: '80',
              url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/rich-casinopng.webp',
              filename: 'rich-casinopng.webp',
            },
          },
          {
            id: 5614,
            page_id: null,
            title: 'R200 Free',
            nofollow: false,
            value: '/za_en/visit/footerNav/punt_casino',
            image: 'punt-casinopng-1.webp',
            image_object: {
              width: '80',
              height: '80',
              url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/punt-casinopng-1.webp',
              filename: 'punt-casinopng-1.webp',
            },
          },
        ],
      },
    ],
  },
  isStorybook: true,
};
