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

import ScoreGauge from '.';

export default {
  title: 'Theme/Molecules/ScoreGauge',
  component: ScoreGauge,
  argTypes: {
    page: {
      name: 'page',
      type: { name: 'object', required: true },
      defaultValue: null,
      description: 'The page object.',
    },
  },
  parameters: {
    docs: {
      description: {
        component: 'A component for rating',
      },
      page: () => (
        <>
          <Title />
          <Description />
          <Primary />
          <ArgsTable story={PRIMARY_STORY} />
        </>
      ),
    },
  },
};

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

export const Default = Template.bind({});
Default.args = {
  page: {
    relation: {
      second_rating: 3,
      third_rating: 5,
      fourth_rating: 4,
      max: 10,
    },
  },
};
