<commit_before>_ = require 'underscore'
React = require 'react'
firebase = require 'firebase/app'
{ Navbar, Nav, NavItem, NavDropdown, MenuItem } = require 'react-bootstrap'
TutorialModal = require './TutorialModal'

module.exports = React.createClass
  getInitialState: ->
    showTutorial: false

  toggleTutorial: ->
    @setState showTutorial: not @state.showTutorial

  songListItems: ->
    _.map @props.getSongNames(), (song, index) =>
      classes = "active" if @props.currentSongIndex is index
      <li className={classes} key={index} onClick={@props.handleSongSelect index}><a href="#">{song}</a></li>

  songList: ->
    if @props.currentUser
      <NavDropdown title="Select Song">
        {@songListItems()}
        <li role="separator" className="divider"></li>
        <NavItem href="#" onClick={@props.newSong}>New Song</NavItem><commit_msg>Fix react-bootstrap bugs in song select dropdown<commit_after>_ = require 'underscore'
React = require 'react'
firebase = require 'firebase/app'
{ Navbar, Nav, NavItem, NavDropdown, MenuItem } = require 'react-bootstrap'
TutorialModal = require './TutorialModal'

module.exports = React.createClass
  getInitialState: ->
    showTutorial: false

  toggleTutorial: ->
    @setState showTutorial: not @state.showTutorial

  songListItems: ->
    _.map @props.getSongNames(), (song, index) =>
      classes = 'active' if @props.currentSongIndex is index
      <MenuItem className={classes} key={index} onClick={@props.handleSongSelect index}>{song}</MenuItem>

  songList: ->
    if @props.currentUser
      <NavDropdown title="Select Song" id="select-song">
        {@songListItems()}
        <MenuItem role="separator" className="divider" />
        <MenuItem onClick={@props.newSong}>New Song</MenuItem>
{'fraction_non_alphanumeric': 0.13961407491486946, 'fraction_numerical': 0.0, 'mean_word_length': 4.247023809523809, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 28, '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': '4203425', 'n_tokens_mistral': 553, 'n_tokens_neox': 521, 'n_words': 124}