<commit_before>import React, {PropTypes} from 'react';
import Item from '../list/item';
import {itemPropType} from '../list/proptypes';
import AddGroup from '../groups/add-group';

const CardHeader = ({item, ui}) => {
  return (
    <div className="card-header">
      {item && <Item
        item={item}
        ui={ui.itemUi}
      />}
      {ui.add && <AddGroup/>}
    </div>
  );
};

CardHeader.propTypes = {
  item: itemPropType,
  ui: PropTypes.object,
};

CardHeader.defaultProps = {
  ui: {},
};

export default CardHeader;
<commit_msg>Now using only top booleans to switch groups<commit_after>import React, {PropTypes} from 'react';
import Item from '../list/item';
import {itemPropType} from '../list/proptypes';
import AddGroup from '../groups/add-group';
import CreateGroup from '../groups/create-group';
import NameGroup from '../groups/name-group';

const CardHeader = ({item, ui}) => {
  return (
    <div className="card-header">
      {ui.create && <CreateGroup/>}
      {ui.name && <NameGroup/>}
      {ui.title && <Item
        item={item}
        ui={ui.itemUi}
      />}
      {ui.add && <AddGroup/>}
    </div>
  );
};

CardHeader.propTypes = {
  item: itemPropType,
  ui: PropTypes.object,
};

CardHeader.defaultProps = {
  ui: {},
};

export default CardHeader;

{'fraction_non_alphanumeric': 0.17821011673151751, 'fraction_numerical': 0.0, 'mean_word_length': 3.031347962382445, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '2348150', 'n_tokens_mistral': 422, 'n_tokens_neox': 425, 'n_words': 101}