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

import Faq from '.';

export default {
  title: 'Theme/Atoms/Faq',
  component: Faq,
  argTypes: {
    module: {
      name: 'module',
      type: { name: 'object', required: true },
      defaultValue: null,
      description: 'The page object.',
    },
    openAll: {
      name: 'openAll',
      type: { name: 'boolean', required: false },
      defaultValue: false,
      description: 'This prop opens all sections',
    },
    openItem: {
      name: 'OpenItem',
      type: { name: 'boolean', required: true },
      defaultValue: '',
      description: 'This prop open a sections',
    },
    closeOthers: {
      name: 'closeOthers',
      type: { name: 'boolean', required: false },
      defaultValue: false,
      description: 'This prop close all others sections',
    },
  },
  parameters: {
    docs: {
      description: {
        component:
          'A component that gets an object of data and generates divs including keys/values. works as a slider on mobile devices',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

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

export const Default = Template.bind({});
Default.args = {
  module: {
    items: [
      {
        question: '🍀 Do online casinos need an Irish gambling licence?',
        answer:
          'Yes. In 2015 there was an amendment to the Irish Gambling Law to legally be able to provide gambling services to Irish players, the online casino needs a licence. When you play online it is important to do some research before you choose a casino, so that you are sure you choose a good and licensed and regulated one.',
      },
      {
        question: '🍀 Is it legal to gamble in Ireland?',
        answer: 'Yes, it is legal provided the online casino has the correct license.',
      },
      {
        question: '🍀 How safe are Irish online casinos?',
        answer:
          'Online casinos are very safe to use if you do your research. Good online casinos will offer only secure payment options, as well as having additional encryption protocols in place. This is to prevent third parties from getting both your money and your personal data. We always provide information on whether an Irish casino has this or not. ',
      },
      {
        question: '🍀 Can I play at Irish Luck from another country?',
        answer:
          'Unfortunately, no. The casino lists and reviews at Irish Luck are aimed for Irish players. Therefore, if you are visiting our website from another country, we suggest that you check out other sites that are localised for your country.',
      },
      {
        question: '🍀 What`s the best online casinos for Irish Players?',
        answer:
          'That`s a good question! And that`s also why it`s not the easiest to answer. It depends on what you prefer and what is important to you when you, when have to choose a gambling site. We recommend that you have a look at the toplist on top of this page. It`s always updated with the best casinos right now! Then go from there and see which one speaks the most to you. Good luck!',
      },
    ],
  },
};
