<commit_before>/**
 * Created by Nicolas on 6/20/15.
 */
import React from 'react';

export default class ChannelItemForm extends React.Component {
    constructor(props) {
        super(props);
        this.state = {collapsed: true};
    }

    expandDidClick() {
        this.setState({collapsed: false});
    }

    render() {
        let content = null;
        const promptBlock = <button
            className="btn btn-sm btn-success"
            onClick={this.expandDidClick.bind(this)}
            type="button"><i className="fa fa-plus"></i>
        </button>;
        const formBlock = <div>
        </div>;

        content = this.state.collapsed ? promptBlock : null;

        return (
            <div className="clearfix">
                <div className="pull-right">
                    {content}
                </div>
            </div>
        );
    }
}<commit_msg>basic input<commit_after>/**
 * Created by Nicolas on 6/20/15.
 */
import React from 'react';

export default class ChannelItemForm extends React.Component {
    constructor(props) {
        super(props);
        this.state = {collapsed: true};
    }

    isValid() {
        return false;
    }

    render() {
        const promptBlock = <button
            className="btn btn-sm btn-primary"
            onClick={this.setExpandedState.bind(this, true)}
            type="button"><i className="fa fa-plus"></i>
        </button>;
        const formBlock = <div>
            <form className="form-inline">
                <div className="form-group">
                    <label htmlFor="channelName">Enter Channel Name</label>
                    <input type="text" className="form-control input-sm" id="channelName" placeholder="Channel"/>
                </div>
                <div className="btn-group btn-group-sm" role="group">
                    <button
                        className="btn btn-danger"
                        onClick={this.setExpandedState.bind(this, false)}
                        type="button">Cancel
                    </button>
                    <button
                        className="btn btn-success"
                        onClick={this.props.successDidClick}
                        disabled={this.isValid.bind(this) ? '' : 'disabled'}
                        type="button"><i className="fa fa-plus"></i> Add Item
                    </button>
                </div>
            </form>
        </div>;

        const content = this.state.collapsed ? promptBlock : formBlock;

        return (
            <div className="channel-item-form clearfix">
                <div className="pull-right">
                    {content}
                </div>
            </div>
        );
    }

    setExpandedState(state) {
        this.setState({collapsed: !state});
    }
}
{'fraction_non_alphanumeric': 0.1255364806866953, 'fraction_numerical': 0.00357653791130186, 'mean_word_length': 1.5198198198198198, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, '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': '4925687', 'n_tokens_mistral': 738, 'n_tokens_neox': 702, 'n_words': 154}