var React = require('react'),
    Router = require('react-router');

var FilterCriteriaSelector = React.createClass({
    render : function() {
        var self = this;
        return (<div>
            
          {this.props.filterCriterias.map(function(fc) {
                                                                          return (<div>

                                                                            <div className='h4' style={{color: '#cd3071'}}>{fc.title}</div>
                                                                            <ul>
                                                                            {fc.filter_criteria_values.map(function(fcv) {
                                                                                                                           return (<li>
                                                                                                                             <a onClick={self.props.onFCClick.bind(self,fc, fcv)}>{fcv.filter_text}</a>
                                                                                                                             </li>)
                                                                                                                         })}
                                                                            </ul>
                                                                            </div>)
                                                                        })}  
            
            </div>)
          
    }
});

module.exports = FilterCriteriaSelector;
