<commit_before>/** @babel */
/** @jsx etch.dom */

import etch from 'etch'
import {classNameForStatus} from '../helpers'

const statusSymbolMap = {
  added: '+',
  deleted: '-',
  modified: '*'
}

export default class FilePatchListItemView {
  constructor (props) {
    this.props = props
    etch.initialize(this)
    this.props.registerItemElement(this.props.mergeConflict, this.element)
  }

  update (props) {
    this.props = props
    this.props.registerItemElement(this.props.mergeConflict, this.element)
    return etch.update(this)
  }

  render () {
    const {mergeConflict, selected, ...others} = this.props
    const status = classNameForStatus[mergeConflict.getFileStatus()]
    const className = selected ? 'is-selected' : ''

    return (
      <div {...others} className={`git-FilePatchListView-item is-${status} ${className}`}>
        <span className={`git-FilePatchListView-icon icon icon-diff-${status} status-${status}`} />
        <span className='git-FilePatchListView-path'>{mergeConflict.getPath()}</span>
        <span className={'git-FilePatchListView ours-theirs-info'}>
          {statusSymbolMap[mergeConflict.getOursStatus()]}
          {statusSymbolMap[mergeConflict.getTheirsStatus()]}
        </span>
      </div>
    )
  }
}<commit_msg>Style ours/theirs status with icons<commit_after>/** @babel */
/** @jsx etch.dom */

import etch from 'etch'
import {classNameForStatus} from '../helpers'

const statusSymbolMap = {
  added: '+',
  deleted: '-',
  modified: '*'
}

export default class FilePatchListItemView {
  constructor (props) {
    this.props = props
    etch.initialize(this)
    this.props.registerItemElement(this.props.mergeConflict, this.element)
  }

  update (props) {
    this.props = props
    this.props.registerItemElement(this.props.mergeConflict, this.element)
    return etch.update(this)
  }

  render () {
    const {mergeConflict, selected, ...others} = this.props
    const fileStatus = classNameForStatus[mergeConflict.getFileStatus()]
    const oursStatus = classNameForStatus[mergeConflict.getOursStatus()]
    const theirsStatus = classNameForStatus[mergeConflict.getTheirsStatus()]
    const className = selected ? 'is-selected' : ''

    return (
      <div {...others} className={`git-FilePatchListView-item is-${fileStatus} ${className}`}>
        <span className={`git-FilePatchListView-icon icon icon-diff-${fileStatus} status-${fileStatus}`} />
        <span className='git-FilePatchListView-path'>{mergeConflict.getPath()}</span>
        <span className={'git-FilePatchListView ours-theirs-info'}>
          <span className={`git-FilePatchListView-icon icon icon-diff-${oursStatus} status-${oursStatus}`} />
          <span className={`git-FilePatchListView-icon icon icon-diff-${theirsStatus} status-${theirsStatus}`} />
        </span>
      </div>
    )
  }
}
{'fraction_non_alphanumeric': 0.14844851904090267, 'fraction_numerical': 0.0, 'mean_word_length': 3.6815181518151814, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '812740', 'n_tokens_mistral': 878, 'n_tokens_neox': 846, 'n_words': 156}