<commit_before>import React from 'react';
import PropTypes from 'prop-types';

import MiqButton from './miq-button';

function FormButtons(props) {
  const primaryTitle = props.customLabel || (props.newRecord ? __('Add') : __('Save'));
  const primaryHandler = (props.newRecord ? props.addClicked : props.saveClicked) || props.addClicked || props.saveClicked;

  const resetTitle = __('Reset');
  const cancelTitle = __('Cancel');

  return (
    <React.Fragment>
      <div className="clearfix"></div>
      <div className="pull-right button-group edit_buttons">
        <MiqButton name={primaryTitle} title={primaryTitle} enabled={props.saveable} onClick={primaryHandler} primary={true} />
        {props.newRecord || <MiqButton name={resetTitle} title={resetTitle} enabled={! props.pristine} onClick={props.resetClicked} />}
        <MiqButton name={cancelTitle} title={cancelTitle} enabled={true} onClick={props.cancelClicked} />

      </div>
    </React.Fragment>
  );
}

FormButtons.propTypes = {
  newRecord: PropTypes.bool,
  customLabel: PropTypes.string,
  saveable: PropTypes.bool,
  pristine: PropTypes.bool,
  addClicked: PropTypes.func,
  saveClicked: PropTypes.func,
  resetClicked: PropTypes.func,<commit_msg>eslint *.jsx - omit bool attribute={true}, autoclose empty elements<commit_after>import React from 'react';
import PropTypes from 'prop-types';

import MiqButton from './miq-button';

function FormButtons(props) {
  const primaryTitle = props.customLabel || (props.newRecord ? __('Add') : __('Save'));
  const primaryHandler = (props.newRecord ? props.addClicked : props.saveClicked) || props.addClicked || props.saveClicked;

  const resetTitle = __('Reset');
  const cancelTitle = __('Cancel');

  return (
    <React.Fragment>
      <div className="clearfix" />
      <div className="pull-right button-group edit_buttons">
        <MiqButton name={primaryTitle} title={primaryTitle} enabled={props.saveable} onClick={primaryHandler} primary />
        {props.newRecord || <MiqButton name={resetTitle} title={resetTitle} enabled={! props.pristine} onClick={props.resetClicked} />}
        <MiqButton name={cancelTitle} title={cancelTitle} enabled onClick={props.cancelClicked} />

      </div>
    </React.Fragment>
  );
}

FormButtons.propTypes = {
  newRecord: PropTypes.bool,
  customLabel: PropTypes.string,
  saveable: PropTypes.bool,
  pristine: PropTypes.bool,
  addClicked: PropTypes.func,
  saveClicked: PropTypes.func,
  resetClicked: PropTypes.func,
{'fraction_non_alphanumeric': 0.1402733118971061, 'fraction_numerical': 0.0, 'mean_word_length': 4.708715596330276, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '2255105', 'n_tokens_mistral': 743, 'n_tokens_neox': 753, 'n_words': 158}