/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import {
  Title,
  Description,
  Primary,
  ArgsTable,
  PRIMARY_STORY,
} from '@storybook/addon-docs/blocks';
import { sampleOperatorCards } from '../../../../../tests/factories/modules/matrix/card.factory';
import TemplateTwo from '../../../../gatsby-core-theme/components/molecules/module';

const operatorData = sampleOperatorCards;

export default {
  title: 'Theme/Modules/Cards/Layout/Template Two',
  component: TemplateTwo,
  argTypes: {
    module: {
      control: 'object',
    },
  },
  args: {
    module: {
      ...operatorData,
    },
    removeModuleIntroduction: false,
  },
  parameters: {
    docs: {
      description: {
        component: 'A Cards Layout Component - Template Two',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

const Template = (args) => <TemplateTwo {...args} />;
export const VariantOne = Template.bind({});
VariantOne.args = {
  pageContext: {
    page: {},
  },
};

export const VariantTwo = Template.bind({});
VariantTwo.args = {
  module: {
    ...operatorData,
    module_introduction: null,
  },
  pageContext: {
    page: {},
  },
};
