import React from 'react';
import {
  Title,
  Description,
  Primary,
  PRIMARY_STORY,
  ArgsTable,
} from '@storybook/addon-docs/blocks';

import BonusBox from '.';
import getPageData from '~tests/factories/pages/default.factory';

export default {
  title: 'Theme/Molecules/Bonus box/Template Four',
  component: BonusBox,
  args: {
    item: {
      name: 'operator',
      type: { name: 'object', required: false },
      description: 'The Operator data object.',
      table: {
        type: { summary: 'object' },
        defaultValue: { summary: '' },
      },
    },
  },
  parameters: {
    docs: {
      description: {
        component: 'Generates a banner including the operator data.',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

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

export const Default = Template.bind({});
Default.args = {
  item: getPageData().relation,
};
