import React from "react";
import {
  Title,
  Subtitle,
  Description,
  Primary,
} from "@storybook/addon-docs/blocks";
import { Avatar, Alert } from "../../../../src";
import { ExclaimIcon, InfoIcon, SuccessIcon } from "../../../../src/atoms/icon";
import { AlertIcon } from "../../../../src/molecules/alertIcon";
import { NavLink } from "../../../../src/atoms/nav";

export default {
  title: "Components/Avatar",
  component: Avatar,
  parameters: {
    docs: {
      page: () => (
        <>
          <Title>Readme</Title>
          <br />
          <Subtitle>
            Note, thise story is explains more about the basic usage of the
            component in your project, how to import and render it. You may find
            examples of code at the story Example.
          </Subtitle>
          <Description>
            `Avatar` use this component for the needs of your project by setting next `props`:
          </Description>
          <Description>
            1. `sm` for small size.
          </Description>
          <Description>
            2. `md` this is default size of the `Avatar`.
          </Description>
          <Description>
            3. `lg` for large size.
          </Description>
          <Description>
            4. `img` for setting up the immage you need.
          </Description>
          <br />
          <Subtitle>
            To integrate Avatar for using at your product, please read the
            information below, or check the example code in stories.
          </Subtitle>
          <Description>
            1. `import &#123; Avatar &#125; from 'seturon';`
          </Description>
          <Description>2. Set the component on the needed page.</Description>
          <Description>3. Set needed `props` at the component.</Description>
          <br />
          <Subtitle>
            To have more idea about the code and usage of the Avatar components,
            check it out:
          </Subtitle>
          <NavLink href="http://design.seturon.io/?path=/docs/components-avatar--example">
            Example
          </NavLink>
        </>
      ),
    },
  },
  args: {
    Props: null,
  },
  argTypes: {
    props: {
      description: null,
      table: {
        type: {
          summary: null,
          detail: null,
        },
      },
      control: {
        type: null,
      },
    },
  },
};

export const Readme = (args) => (
  <>
    <Avatar size="sm" />
    <Avatar size="md" />
    <Avatar size="lg" />
  </>
);

export const Example = () => (
  <>
    <Avatar size="sm" />
    <Avatar size="md" />
    <Avatar size="lg" />
  </>
);

Example.storyName = "Example";

Example.parameters = {
  component: Avatar,
  docs: {
    page: () => (
      <>
        <Title>Example</Title>
        <Subtitle>Props</Subtitle>
        <Description>
            `Avatar` use this component for the needs of your project by setting next `props`:
          </Description>
          <Description>
            1. `sm` for small size.
          </Description>
          <Description>
            2. `md` this is default size of the `Avatar`.
          </Description>
          <Description>
            3. `lg` for large size.
          </Description>
          <Description>
            4. `img` for setting up the immage you need.
          </Description>
        <br />
        <Subtitle>
          Check the code below to get an idea of how to use it at your product👇
        </Subtitle>
        <Primary name="Example" />
      </>
    ),
  },
};
