var SeatList = React.createClass({
  propTypes: {
    seats: React.PropTypes.array
  },

  seatNodes: function() {
    var onSeatSubmit = this.props.onSeatSubmit;
    var current_user = this.props.current_user;
    var seatNodes = this.props.seats.map(function(seat){
      return (
        <Seat
          key={seat.id}
          id={seat.id}
          user_id={seat.user_id}
          user_soft_token={seat.user_soft_token}
          user_display_name={seat.user_display_name}
          current_user={current_user}
          onSeatSubmit={onSeatSubmit} />
      )
    })
    return seatNodes;
  },

  render: function() {
    return (
      <div id="seatList">
          {this.seatNodes()[0]}
          {this.seatNodes()[1]}
          {this.seatNodes()[2]}
          {this.seatNodes()[3]}
      </div>
    );
  }

});
