<commit_before>/** @jsx React.DOM */

var EventScheduler = React.createClass({
  STEPS: ['input', 'select', 'create'],

  getInitialState: function () {
    return {
      step: this.STEPS[0],
      summary: 'new event',
      location: '',
      duration: 60,
      description: '',
      timeslots: null,
      timeslot: null,
      selected: null
    };
  },

  render: function () {
    switch(this.state.step) {
      case 'select':
        return this.renderSelect();

      case 'create':
        return this.renderCreate();

      default: // step
        return this.renderInput();
    }
  },

  renderInput: function () {
    // TODO: add a field for event description
    return (
        <div className="scheduler">
          <form onSubmit={this.calculateTimeslots} >
            <table><commit_msg>Set initial focus to event title<commit_after>/** @jsx React.DOM */

var EventScheduler = React.createClass({
  STEPS: ['input', 'select', 'create'],

  getInitialState: function () {
    return {
      step: this.STEPS[0],
      summary: 'new event',
      location: '',
      duration: 60,
      description: '',
      timeslots: null,
      timeslot: null,
      selected: null
    };
  },

  render: function () {
    switch(this.state.step) {
      case 'select':
        return this.renderSelect();

      case 'create':
        return this.renderCreate();

      default: // step
        return this.renderInput();
    }
  },

  componentDidMount: function() {
    // Set initial focus to the title input
    var summary = this.refs.summary;
    if (summary) {
      summary.getDOMNode().select();
    }
  },

  renderInput: function () {
    // TODO: add a field for event description
    return (
        <div className="scheduler">
          <form onSubmit={this.calculateTimeslots} >
            <table>
{'fraction_non_alphanumeric': 0.13636363636363635, 'fraction_numerical': 0.0032858707557502738, 'mean_word_length': 2.216549295774648, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4211193', 'n_tokens_mistral': 546, 'n_tokens_neox': 527, 'n_words': 135}