<commit_before>/* @flow */

import React from 'react';

// type Props = {
//   children?: any,
//   className?: string,
//   glyph?: string,
//   onClick?: () => void,
// };

export default function TabWrangleOption() {
  return (
    <div className="row">
      <div className="col-xs-8">
        <form
          onSubmit={this.handleAddPatternSubmit}
          style={{marginBottom: '20px'}}>
          <label htmlFor="wl-add">Auto-lock tabs with URLs containing:</label>
          <div className="input-group">
            <input
              className="form-control"
              id="wl-add"
              onChange={this.handleNewPatternChange}
              type="text"
              value={this.state.newPattern}
            />
            {/* <span className="input-group-btn">
              <button
                className="btn btn-default"
                disabled={!isValidPattern(this.state.newPattern)}
                id="addToWL"
                type="submit">
                Add
              </button>
            </span> */}
          </div>
          <p className="help-block">
            <strong>Example:</strong> <i>cnn</i> would match every page on <i>cnn.com</i> and
            any URL with <i>cnn</i> anywhere in it.
          </p>
        </form>
      </div>
    </div>
  );
}<commit_msg>add radio buttons<commit_after>/* @flow */

import React from 'react';

// type Props = {
//   children?: any,
//   className?: string,
//   glyph?: string,
//   onClick?: () => void,
// };

export default function TabWrangleOption() {
  constructor(props) {
    super(props);

    this.handleChange = this.handleChange.bind(this);
  }

  handleChange(e) {
    console.log(e.target);
  }

  const checked = this.props.checked;
  return (
    <div className="row">
      <div className="col-xs-8">
        <form
          onSubmit={this.handleAddPatternSubmit}
          style={{marginBottom: '20px'}}>
          <label htmlFor="wl-add">Wrangle Tab Options:</label>
          <div className="input-group">
              onChange={this.handleChange}>
              <input type="radio" value="withDupes" name="option" checked={checked === "withDupes"}/>With Duplicates
              <input type="radio" value="exactURLMatch" name="option" checked={checked === "exactURLMatch"}/>Exact URL match
              <input type="radio" value="hostnameAndTitleMatch" name="option" checked={checked === "hostnameAndTitleMatch"}/>Hostname and Title match
          </div>
          <p className="help-block">
            <strong>Example:</strong> <i>cnn</i> would match every page on <i>cnn.com</i> and
            any URL with <i>cnn</i> anywhere in it.
          </p>
        </form>
      </div>
    </div>
  );
}
{'fraction_non_alphanumeric': 0.15686994856722997, 'fraction_numerical': 0.002204261572373255, 'mean_word_length': 2.018847006651885, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 54, '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': '5800363', 'n_tokens_mistral': 804, 'n_tokens_neox': 795, 'n_words': 171}