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

export default {
  title: 'Theme/Atoms/Tooltip',
  component: Tooltip,
  argTypes: {
    children: {
      name: 'children',
      description: 'Tooltip Content',
      defaultValue: 'Hover on desktop, click on mobile to view tooltip',
    },
    content: {
      name: 'content',
      description: 'Tooltip Content',
      defaultValue: 'This is a tooltip',
    },
    direction: {
      name: 'direction',
      type: { name: 'string', required: false },
      defaultValue: 'top',
      description: 'Tracker type for the bonus',
      table: {
        type: { summary: 'string' },
        defaultValue: { summary: 'top' },
      },
      control: {
        type: 'inline-radio',
        options: ['top', 'bottom', 'left', 'right'],
      },
    },
    delay: {
      name: 'delay',
      description: 'Tooltip Delay',
      defaultValue: '400',
    },
  },
  parameters: {
    docs: {
      description: {
        component: 'A component that displays authors cards',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

const Template = (args) => (
  <div style={{ width: '50vw', margin: '30px auto' }}>
    <Tooltip {...args} />
  </div>
);
export const Default = Template.bind({});
Default.args = {};
