/* eslint-disable react/destructuring-assignment */
import React from 'react';
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
import getAuthorList from '../../../../../../tests/factories/authors/author.factory';
import TemplateTwo from '.';

const author = getAuthorList({})[1];

export default {
  title: 'Theme/Modules/Cards/Author/Template Two',
  component: TemplateTwo,
  argTypes: {
    item: {
      relation: {
        ...author,
      },
    },
  },
};

const Template = (args) => (
  <div
    style={{
      maxWidth: ' 34.3rem',
      margin: '0 auto',
    }}
  >
    <Context.Provider value={{}}>
      <TemplateTwo {...args} />
    </Context.Provider>
  </div>
);

export const Default = Template.bind({});

Default.args = {
  item: {
    relation: {
      ...author,
    },
  },
};
