/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
import { AiOutlineQuestionCircle } from '@react-icons/all-files/ai/AiOutlineQuestionCircle';
import getOperatorData from '../../../../tests/factories/pages/operator.factory';
import WageringCalculator from '.';

export default {
  title: 'Theme/Modules/Template Blocks/Calculators/Wagering Calculator',
  component: WageringCalculator,
  argTypes: {
    mainTitle: {
      name: 'mainTitle',
      type: { name: 'string', required: false },
      description: 'Main Block Title',
      defaultValue: 'Wagering Requirement Calculator',
    },
    infoIcon: {
      name: 'infoIcon',
      type: { name: 'object', required: false },
      description: 'Info Block Icon',
      defaultValue: AiOutlineQuestionCircle,
    },
    infoTitle: {
      name: 'infoTitle',
      type: { name: 'string', required: false },
      description: 'Info Block Title',
      defaultValue: 'Example: 20x wagering requirement',
    },
    infoText: {
      name: 'infoText',
      type: { name: 'string', required: false },
      description: 'Info Block Text',
      defaultValue:
        'Lorem ipsum dolor sit amet consectetur. Pharetra sed etiam placerat interdum ut. Pretium ipsum ultrices interdum condimentum nullam. Suscipit augue placerat laoreet hendrerit dui euismod quam rutrum. Magna in luctus egestas massa erat. Lorem ipsum dolor sit amet consectetur. Pharetra sed etiam placerat interdum ut. Pretium ipsum ultrices interdum condimentum nullam. Suscipit augue placerat laoreet hendrerit dui euismod quam rutrum. Magna in luctus egestas massa erat. Lorem ipsum dolor sit amet consectetur. Pharetra sed etiam placerat interdum ut. Pretium ipsum ultrices interdum condimentum nullam. Suscipit augue placerat laoreet hendrerit dui euismod quam rutrum. Magna in luctus egestas massa erat. Lorem ipsum dolor sit amet consectetur. Pharetra sed etiam placerat interdum ut. Pretium ipsum ultrices interdum condimentum nullam. Suscipit augue placerat laoreet hendrerit dui euismod quam rutrum. Magna in luctus egestas massa erat.',
    },
    pageContext: {
      defaultValue: {
        marketSections: {
          recommended_casinos: {
            modules: [
              {
                items: [
                  {
                    items: [getOperatorData(), getOperatorData(), getOperatorData()],
                  },
                ],
              },
            ],
          },
        },
      },
    },
  },
};

const Template = (args) => (
  <Context.Provider value={{}}>
    <WageringCalculator {...args} />
  </Context.Provider>
);

export const Default = Template.bind({});
Default.args = {
  translations: {
    wagecalc_deposit_amount: 'Deposit amount',
    wagecalc_bonus_amount: 'Bonus amount',
    wagecalc_wagering: 'Wagering',
    wagecalc_bonus: 'Bonus',
    wagecalc_deposit_bonus: 'Deposit + Bonus',
    wagecalc_contribution: 'Contribution %',
    wagecalc_calculate: 'Calculate',
  },
};
