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

export default {
  title: 'Theme/Atoms/Link Menu',
  component: LinkMenu,
  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. Used frequently for example in footers.',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

const Template = (args) => <LinkMenu {...args} />;
export const Default = Template.bind({});
Default.args = {
  section: {
    modules: [
      {
        name: 'menu',
        menu_short_code: 'nav_1',
        children: [
          {
            title: 'Top Casinos',
            value: '#',
            children: [
              { title: 'Rizk Casino', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              { title: 'Gopher Gold', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              { title: 'Bet 365', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              { title: 'Sun Vegas', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              { title: 'Kassu Casino', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              {
                title: 'Dream Vegas Casino',
                value: '#',
                image: 'rizk-logopng7ed316ac19-original.png',
              },
              { title: 'Betfair', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              { title: 'Chanz Casino', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
            ],
          },
          {
            title: 'Info',
            value: '#',
            children: [
              { title: 'Privacy policy', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              { title: 'Contact us', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              { title: 'Paddy Power', value: '#', image: 'rizk-logopng7ed316ac19-original.png' },
              {
                title: 'Pearls of India',
                value: '#',
                image: 'rizk-logopng7ed316ac19-original.png',
              },
              {
                title: 'Break da Bank Again',
                value: '#',
                image: 'rizk-logopng7ed316ac19-original.png',
              },
            ],
          },
        ],
      },
    ],
  },
};
