{"size": 1773, "ext": "js", "max_stars_repo_path": "public/scripts/components/navbar.js", "max_stars_repo_name": "asarode/flux-grok", "max_stars_repo_stars_event_min_datetime": "2015-08-07T01:47:24.000Z", "max_stars_repo_stars_event_max_datetime": "2015-08-07T02:33:46.000Z", "max_issues_repo_path": "public/scripts/components/navbar.js", "max_issues_repo_name": "asarode/flux-grok", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/scripts/components/navbar.js", "max_forks_repo_name": "asarode/flux-grok", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.4430379747, "max_line_length": 63, "alphanum_fraction": 0.4895657078}
'use strict'

import React from 'react'
import cx from 'classname'

class Navbar extends React.Component {
	constructor(props) {
		super(props)
    this.state = {
      active: 'all'
    }
	}

  render() {
    let { active } = this.state

    return (
      <div className="fg-navbar-wrapper">
        <ul className="fg-navbar">
          <li
            ref="all"
            onClick={this.onSwitch.bind(this, 'all')}
            className={cx('fg-navbar-item', 'fg-navbar-link', {
              'fg-navbar-link--active': active === 'all'
            })}>
            All
          </li>
          <li
            ref="reviewing"
            onClick={this.onSwitch.bind(this, 'reviewing')}
            className={cx('fg-navbar-item', 'fg-navbar-link', {
              'fg-navbar-link--active': active === 'reviewing'
            })}>
            Reviewing
          </li>
          <li
            ref="accepted"
            onClick={this.onSwitch.bind(this, 'accepted')}
            className={cx('fg-navbar-item', 'fg-navbar-link', {
              'fg-navbar-link--active': active === 'accepted'
            })}>
            Accepted
          </li>
          <li
            ref="search"
            onClick={this.onSearch.bind(this)}
            className="fg-navbar-item">
            <input type="text" placeholder="Search..."/>
          </li>
          <li
            ref="create"
            className="fg-navbar-item">
            <button>+ Enter New Applicant</button>
          </li>
        </ul>
      </div>
    )
  }

  onSwitch(target) {
    this.setState({
      active: target
    })
  }

  onSearch() {
    return
  }
}

Navbar.PropTypes = {
  onSwitch: React.PropTypes.func
}

Navbar.defaultProps = {}

Navbar.contextTypes = {}

export default Navbar