import React from 'react';
import {
  Title,
  Description,
  Primary,
  PRIMARY_STORY,
  ArgsTable,
} from '@storybook/addon-docs/blocks';
import content_1 from '../../../../static/images/content-1.png';
import content_2 from '../../../../static/images/content-2.png';
import content_3 from '../../../../static/images/content-3.png';

import ContentBox from '.';

export default {
  title: 'Theme/Atoms/Content Box',
  component: ContentBox,
  argTypes: {
    data: {
      name: 'data',
      type: { name: 'array', required: true },
      defaultValue: '',
      description: 'Array of data objects.',
      table: {
        type: { summary: 'array' },
        defaultValue: { summary: '' },
      },
    },
  },
  parameters: {
    docs: {
      description: {
        component: 'Generates list of content boxes.',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

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

export const Default = Template.bind({});
Default.args = {
  data: [
    {
      title: 'Fully licensed casinos',
      image: content_1,
      text: 'We only list and review fully licensed and legally operating casinos so you can be sure where you end up playing will be safe and secure.',
    },
    {
      title: 'Get the most for your money',
      image: content_2,
      text: 'We list all the features the Casinos have to offer so you can make an educated decision about where to place your money for maximum gains!',
    },
    {
      title: 'Authenticly written articles',
      image: content_3,
      text: 'All our Authors are professional writers with industry know-how, so you can depend on what we say is the truth!',
    },
  ],
};
