 CricketPoints = require '../constants/cricket_points'
 RoundActions = require '../actions/round'
 { connect } = require 'react-redux'
+_ = require 'underscore'
 
 { a, div, td, tr } = React.DOM
 


  scoreClick: (multiplier) -> (=> @props.score(multiplier))

  render: ->
    marks = @availableMarks()


      td {},
        div {className: 'btn-group'},
          marks.map (mark) =>
            a {href: '#', className: "btn btn-primary #{@btnClass(mark)}", onClick: @scoreClick(mark), key: mark}, "#{mark}x"

mapStateToProps = (state) ->
  currentTeam: state.round.get('rounds').last().get('team_id')

mapDispatchToProps = (dispatch, props) ->
  score: (multiplier) ->
    dispatch(RoundActions.score(props.points, multiplier, props.scoreboard))

module.exports = connect(mapStateToProps, mapDispatchToProps)(ScoringButtons)
