/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import {
  Title,
  Description,
  Primary,
  ArgsTable,
  PRIMARY_STORY,
} from '@storybook/addon-docs/blocks';
import VerifiedAuthor from '../../../../images/icons/verified-author';
import AuthorTemplateOne from '.';

export default {
  title: 'Theme/Atoms/Author/Template Three',
  component: AuthorTemplateOne,
  argTypes: {
    authorImageWidth: {
      name: 'authorImageWidth',
      type: { name: 'number', required: false },
      defaultValue: 48,
      description: 'Author/Reviewer image width',
      table: {
        type: { summary: 'number' },
        defaultValue: { summary: 48 },
      },
    },
    authorTitle: {
      name: 'authorTitle',
      type: { name: 'string', required: false },
      defaultValue: 'Casino Export',
      description: 'Author job title',
    },
    authorImageHeight: {
      name: 'authorImageHeight',
      type: { name: 'number', required: false },
      defaultValue: 48,
      description: 'Author/Reviewer image height',
      table: {
        type: { summary: 'number' },
        defaultValue: { summary: 48 },
      },
    },
    authorName: {
      control: 'text',
      defaultValue: 'John Doe',
    },
    authorPath: {
      control: 'text',
      defaultValue: 'https://example.com',
    },
    authorImage: {
      control: 'text',
      defaultValue: '1675685947/ellipse-1.png',
    },
    verify: {
      name: 'verify',
      type: { name: 'element', required: false },
      defaultValue: <VerifiedAuthor />,
      description: 'Icon for verify badge',
      table: {
        type: { summary: 'element' },
        defaultValue: { summary: <VerifiedAuthor /> },
      },
    },
    showVerification: {
      name: 'showVerification',
      type: { name: 'boolean', required: false },
      defaultValue: true,
      description: 'Show/Hide verification badge for reviewer only',
      table: {
        type: { summary: 'boolean' },
        defaultValue: { summary: true },
      },
    },
    isReviewer: {
      name: 'isReviewer',
      type: { name: 'boolean', required: false },
      defaultValue: false,
      description: 'Indicate if its a Reviewer',
      table: {
        type: { summary: 'boolean' },
        defaultValue: { summary: false },
      },
    },
    prefix: {
      name: 'prefix',
      type: { name: 'string', required: false },
      defaultValue: '',
      description: 'Author Prefix',
      table: {
        type: { summary: 'string' },
        defaultValue: { summary: '' },
      },
    },
    showLinks: {
      name: 'showLinks',
      type: { name: 'boolean', required: false },
      defaultValue: true,
      description: 'Show/Hide links',
      table: {
        type: { summary: 'boolean' },
        defaultValue: { summary: true },
      },
    },
    showPrefix: {
      name: 'showPrefix',
      type: { name: 'boolean', required: false },
      defaultValue: false,
      description: 'Show/Hide author/reviewer prefix',
      table: {
        type: { summary: 'boolean' },
        defaultValue: { summary: false },
      },
    },
    showTitle: {
      name: 'showTitle',
      type: { name: 'boolean', required: false },
      defaultValue: true,
      description: 'Show/Hide links',
      table: {
        type: { summary: 'boolean' },
        defaultValue: { summary: true },
      },
    },
    type: {
      name: 'type',
      type: { name: 'string', required: false },
      defaultValue: 'default',
      description: 'Page template - change prefix based on this',
      table: {
        type: { summary: 'string' },
        defaultValue: { summary: '' },
      },
    },
  },
  parameters: {
    docs: {
      description: {
        component: 'AuthorTemplateOne component',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

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

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