context = window
rest = window.JK.Rest()
logger = context.JK.logger

@GenreCheckBoxList = React.createClass({

  mixins: [Reflux.listenTo(@GenreStore,"onGenresChanged")]

  propTypes: {
    onItemChanged: React.PropTypes.func.isRequired
  }

  getDefaultProps: () ->
    selectedGenres: []

  getInitialState:() ->
    {genres: []}

  onGenresChanged: (genres) ->
    @setState({genres: genres})

    
  render: () ->
    `<div className="GenreCheckBoxList react-component">
        <CheckBoxList objectName='genres' onItemChanged={this.props.onItemChanged} sourceObjects={this.state.genres} selectedObjects={this.props.selectedGenres}/>
    </div>`
})