<commit_before>(function() {
  window.shared || (window.shared = {});
  var dom = window.shared.ReactHelpers.dom;
  var createEl = window.shared.ReactHelpers.createEl;
  var merge = window.shared.ReactHelpers.merge;
  
  var Educator = window.shared.Educator;
  var TakeNotes = window.shared.TakeNotes;
  var RecordService = window.shared.RecordService;
  var PropTypes = window.shared.PropTypes;
  var serviceColor = window.shared.serviceColor;

  // TODO(kr) need to clean these all out
  var styles = {
    container: {
      display: 'flex'
    },
    notesContainer: {
      flex: 1,
      marginRight: 20
    },
    dialog: {
      border: '1px solid #ccc',
      borderRadius: 2,
      padding: 20,
      marginBottom: 20,
      marginTop: 10
    },
    addServiceContainer: {
      marginTop: 10
    },
    interventionsContainer: {
      flex: 1
    },
    noItems: {
      margin: 10
    },
    inlineBlock: {
      display: 'inline-block'
    },
    userText: {
      whiteSpace: 'pre-wrap'
    },
    daysAgo: {
      opacity: 0.25,
      paddingLeft: 10,
      display: 'inline-block'
    },
    title: {
      borderBottom: '1px solid #333',
      // fontWeight: 'bold',
      color: 'black',
      padding: 10,
      paddingLeft: 0
    },
    date: {
      paddingRight: 10,
      fontWeight: 'bold',
      display: 'inline-block'
    },
    badge: {
      display: 'inline-block',
      background: '#eee',
      outline: '3px solid #eee',
      width: '10em',
      textAlign: 'center',
      marginLeft: 10,
      marginRight: 10
    },
    educator: {
      paddingLeft: 5,
      display: 'inline-block'
    },
    note: {
      border: '1px solid #eee',
      padding: 15,
      marginTop: 10,
      marginBottom: 10
    },
    service: {
      border: '1px solid #eee',
      padding: 15,
      marginTop: 10,
      marginBottom: 10
    },
    cancelTakeNotesButton: { // overidding CSS
      color: 'black',
      background: '#eee',
      marginLeft: 10
    },
    noteText: {
      marginTop: 5
    },
    discontinue: {
      background: 'white',
      opacity: 0.5,
      border: '1px solid #ccc',
      color: '#666'
    }
  };


  //{key, noteMoment, badge, educator_id, content}
  var NoteHeader = React.createClass({
    render: function() {
      var header = this.props; // TODO(kr)
      return dom.div({
        className: 'note',
        style: styles.note
      },
        dom.div({}, 
          dom.span({ style: styles.date }, header.noteMoment.format('MMMM D, YYYY')),
          header.badge,
          dom.span({ style: styles.educator }, createEl(Educator, {
            educator: this.props.educatorsIndex[header.educatorId]
          }))
        ),
        dom.div({ style: { whiteSpace: 'pre-wrap' } },
          dom.div({ style: styles.noteText }, header.content)
        )
      );
    }<commit_msg>Note about NoteHeader<commit_after>(function() {
  window.shared || (window.shared = {});
  var dom = window.shared.ReactHelpers.dom;
  var createEl = window.shared.ReactHelpers.createEl;
  var merge = window.shared.ReactHelpers.merge;
  
  var Educator = window.shared.Educator;
  var TakeNotes = window.shared.TakeNotes;
  var RecordService = window.shared.RecordService;
  var PropTypes = window.shared.PropTypes;
  var serviceColor = window.shared.serviceColor;

  // TODO(kr) need to clean these all out
  var styles = {
    container: {
      display: 'flex'
    },
    notesContainer: {
      flex: 1,
      marginRight: 20
    },
    dialog: {
      border: '1px solid #ccc',
      borderRadius: 2,
      padding: 20,
      marginBottom: 20,
      marginTop: 10
    },
    addServiceContainer: {
      marginTop: 10
    },
    interventionsContainer: {
      flex: 1
    },
    noItems: {
      margin: 10
    },
    inlineBlock: {
      display: 'inline-block'
    },
    userText: {
      whiteSpace: 'pre-wrap'
    },
    daysAgo: {
      opacity: 0.25,
      paddingLeft: 10,
      display: 'inline-block'
    },
    title: {
      borderBottom: '1px solid #333',
      // fontWeight: 'bold',
      color: 'black',
      padding: 10,
      paddingLeft: 0
    },
    date: {
      paddingRight: 10,
      fontWeight: 'bold',
      display: 'inline-block'
    },
    badge: {
      display: 'inline-block',
      background: '#eee',
      outline: '3px solid #eee',
      width: '10em',
      textAlign: 'center',
      marginLeft: 10,
      marginRight: 10
    },
    educator: {
      paddingLeft: 5,
      display: 'inline-block'
    },
    note: {
      border: '1px solid #eee',
      padding: 15,
      marginTop: 10,
      marginBottom: 10
    },
    service: {
      border: '1px solid #eee',
      padding: 15,
      marginTop: 10,
      marginBottom: 10
    },
    cancelTakeNotesButton: { // overidding CSS
      color: 'black',
      background: '#eee',
      marginLeft: 10
    },
    noteText: {
      marginTop: 5
    },
    discontinue: {
      background: 'white',
      opacity: 0.5,
      border: '1px solid #ccc',
      color: '#666'
    }
  };


  // TODO(kr) extract, simplify styles
  //props: {key, noteMoment, badge, educator_id, content}
  var NoteHeader = React.createClass({
    render: function() {
      var header = this.props; // TODO(kr)
      return dom.div({
        className: 'note',
        style: styles.note
      },
        dom.div({}, 
          dom.span({ style: styles.date }, header.noteMoment.format('MMMM D, YYYY')),
          header.badge,
          dom.span({ style: styles.educator }, createEl(Educator, {
            educator: this.props.educatorsIndex[header.educatorId]
          }))
        ),
        dom.div({ style: { whiteSpace: 'pre-wrap' } },
          dom.div({ style: styles.noteText }, header.content)
        )
      );
    }
{'fraction_non_alphanumeric': 0.13370473537604458, 'fraction_numerical': 0.021239554317548745, 'mean_word_length': 1.9968701095461658, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3872359', 'n_tokens_mistral': 1950, 'n_tokens_neox': 1839, 'n_words': 423}