<commit_before>import React from 'react'
import {storiesOf} from 'part:@sanity/storybook'

// import * as FontAwesome from 'react-icons/lib/fa'
// import * as MaterialDesignIcons from 'react-icons/lib/md'
// import * as Typicons from 'react-icons/lib/ti'
// import * as GithubOcticons from 'react-icons/lib/go'
// import * as Ionicons from 'react-icons/lib/io'

// import {keysIn} from 'lodash'
import styles from './styles/iconStory.css'

// Sanity icons
import CloseIcon from 'part:@sanity/base/close-icon'
import AngleDownIcon from 'part:@sanity/base/angle-down-icon'
import SpinnerIcon from 'part:@sanity/base/spinner-icon'
import SanityLogoIcon from 'part:@sanity/base/sanity-logo-icon'
import HamburgerIcon from 'part:@sanity/base/hamburger-icon'

function createIconPreview(title, Icon, role) {
  return (
    <li className={styles.sanityIcon}>
      <div className={styles.title}>{title}</div>
      <div className={styles.role}>import {Icon.name} from '{role}'</div>
      <span className={styles.iconPreviewXL}><Icon /></span>
      <span className={styles.iconPreviewL}><Icon /></span>
      <span className={styles.iconPreviewM}><Icon /></span>
      <span className={styles.iconPreviewS}><Icon /></span>
      <span className={styles.iconPreviewXS}><Icon /></span>
    </li>
  )
}

storiesOf('Icons')
.add(
  'Used icons',
  () => {
    return (
      <ul className={styles.sanityIcons}>
        {createIconPreview('Sanity logo', SanityLogoIcon, 'part:@sanity/base/sanity-logo-icon')}
        {createIconPreview('Close', CloseIcon, 'part:@sanity/base/close-icon')}
        {createIconPreview('Angle Down', AngleDownIcon, 'part:@sanity/base/angle-down-icon')}
        {createIconPreview('Spinner', SpinnerIcon, 'part:@sanity/base/spinner-icon')}
        {createIconPreview('Hamburger', HamburgerIcon, 'part:@sanity/base/hamburger-icon')}
      </ul>
    )
  },
  {inline: false}
)

/*
.add(
  'Font awesome',
  () => {<commit_msg>Adding text edit icons to story<commit_after>import React from 'react'
import {storiesOf} from 'part:@sanity/storybook'

// import * as FontAwesome from 'react-icons/lib/fa'
// import * as MaterialDesignIcons from 'react-icons/lib/md'
// import * as Typicons from 'react-icons/lib/ti'
// import * as GithubOcticons from 'react-icons/lib/go'
// import * as Ionicons from 'react-icons/lib/io'

// import {keysIn} from 'lodash'
import styles from './styles/iconStory.css'

// Sanity icons
import CloseIcon from 'part:@sanity/base/close-icon'
import AngleDownIcon from 'part:@sanity/base/angle-down-icon'
import SpinnerIcon from 'part:@sanity/base/spinner-icon'
import SanityLogoIcon from 'part:@sanity/base/sanity-logo-icon'
import HamburgerIcon from 'part:@sanity/base/hamburger-icon'
import UploadIcon from 'part:@sanity/base/upload-icon'
import FormatBoldIcon from 'part:@sanity/base/format-bold-icon'
import FormatItalicIcon from 'part:@sanity/base/format-italic-icon'
import FormatListBulletedIcon from 'part:@sanity/base/format-list-bulleted-icon'
import FormatListNumberedIcon from 'part:@sanity/base/format-list-numbered-icon'
import FormatQuoteIcon from 'part:@sanity/base/format-quote-icon'
import FormatStrikethroughIcon from 'part:@sanity/base/format-strikethrough-icon'
import FormatUnderlinedIcon from 'part:@sanity/base/format-underlined-icon'
import FullscreenIcon from 'part:@sanity/base/fullscreen-icon'
import FullscreenExitIcon from 'part:@sanity/base/fullscreen-exit-icon'
import PlusIcon from 'part:@sanity/base/plus-icon'

function createIconPreview(title, Icon, role) {
  return (
    <li className={styles.sanityIcon}>
      <div className={styles.title}>{title}</div>
      <div className={styles.role}>import {Icon.name} from '{role}'</div>
      <span className={styles.iconPreviewXL}><Icon /></span>
      <span className={styles.iconPreviewL}><Icon /></span>
      <span className={styles.iconPreviewM}><Icon /></span>
      <span className={styles.iconPreviewS}><Icon /></span>
      <span className={styles.iconPreviewXS}><Icon /></span>
    </li>
  )
}

storiesOf('Icons')
.add(
  'Used icons',
  () => {
    return (
      <ul className={styles.sanityIcons}>
        {createIconPreview('Sanity logo', SanityLogoIcon, 'part:@sanity/base/sanity-logo-icon')}
        {createIconPreview('Close', CloseIcon, 'part:@sanity/base/close-icon')}
        {createIconPreview('Angle Down', AngleDownIcon, 'part:@sanity/base/angle-down-icon')}
        {createIconPreview('Spinner', SpinnerIcon, 'part:@sanity/base/spinner-icon')}
        {createIconPreview('Hamburger', HamburgerIcon, 'part:@sanity/base/hamburger-icon')}

        {createIconPreview('Upload', UploadIcon, 'part:@sanity/base/upload-icon')}
        {createIconPreview('Format bold', FormatBoldIcon, 'part:@sanity/base/format-bold-icon')}
        {createIconPreview('Format italic', FormatItalicIcon, 'part:@sanity/base/format-italic-icon')}
        {createIconPreview('Format List (bulleted)', FormatListBulletedIcon, 'part:@sanity/base/format-list-bulleted-icon')}
        {createIconPreview('Format List (numbered)', FormatListNumberedIcon, 'part:@sanity/base/format-list-numbered-icon')}
        {createIconPreview('Format quote', FormatQuoteIcon, 'part:@sanity/base/format-quote-icon')}
        {createIconPreview('Format strikethrough', FormatStrikethroughIcon, 'part:@sanity/base/format-strikethrough-icon')}
        {createIconPreview('Format underlined', FormatUnderlinedIcon, 'part:@sanity/base/format-underlined-icon')}
        {createIconPreview('Fullscreen', FullscreenIcon, 'part:@sanity/base/fullscreen-icon')}
        {createIconPreview('Fullscreen exit', FullscreenExitIcon, 'part:@sanity/base/fullscreen-exit-icon')}
        {createIconPreview('Plus', PlusIcon, 'part:@sanity/base/plus-icon')}

      </ul>
    )
  },
  {inline: false}
)

/*
.add(
  'Font awesome',
  () => {
{'fraction_non_alphanumeric': 0.15818431911966988, 'fraction_numerical': 0.0, 'mean_word_length': 4.697355533790401, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '465644', 'n_tokens_mistral': 1961, 'n_tokens_neox': 1917, 'n_words': 338}