<commit_before>class Lanes.Components.Toolbar extends Lanes.React.Component

    propTypes:
        onSave: React.PropTypes.func
        toggleEdit: Lanes.PropTypes.Model
        commands: React.PropTypes.object.isRequired

    dataObjects:
        changedModel: -> @props.commands.getModel()

    bindDataEvents:
        changedModel: 'remote-update'

    renderSaveButton: ->
        <BS.Button navItem componentClass="button" disabled={!@isSavable()}
            onClick={@props.commands.saveModel} className="save navbar-btn control">
            <LC.Icon type="cloud-upload" />{@props.saveButtonText || 'Save'}
        </BS.Button>

    renderResetButton: ->
        <BS.Button navItem componentClass="button"
            onClick={@props.commands.resetModel} className="save navbar-btn control">
            <LC.Icon type="undo" />Reset
        </BS.Button>

    renderPrintButton: ->
        <BS.Button navItem componentClass="button"
            onClick={@props.commands.printModel} className="print navbar-btn control"><commit_msg>Modify button to read 'Create' when model is new<commit_after>class Lanes.Components.Toolbar extends Lanes.React.Component

    propTypes:
        onSave: React.PropTypes.func
        toggleEdit: Lanes.PropTypes.Model
        commands: React.PropTypes.object.isRequired

    dataObjects:
        changedModel: -> @props.commands.getModel()

    bindDataEvents:
        changedModel: 'remote-update'

    renderSaveButton: ->
        model = @props.commands.getModel()
        text = if model.isNew() then 'Create' else 'Save'
        <BS.Button navItem componentClass="button" disabled={!@isSavable()}
            onClick={@props.commands.saveModel} className="save navbar-btn control">
            <LC.Icon type="cloud-upload" />{text}
        </BS.Button>

    renderResetButton: ->
        <BS.Button navItem componentClass="button"
            onClick={@props.commands.resetModel} className="save navbar-btn control">
            <LC.Icon type="undo" />Reset
        </BS.Button>

    renderPrintButton: ->
        <BS.Button navItem componentClass="button"
            onClick={@props.commands.printModel} className="print navbar-btn control">
{'fraction_non_alphanumeric': 0.12071330589849108, 'fraction_numerical': 0.0, 'mean_word_length': 2.8657243816254416, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 25, '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': '6805530', 'n_tokens_mistral': 605, 'n_tokens_neox': 602, 'n_words': 117}