<commit_before>import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'

import { withStyles } from 'material-ui/styles'
import Button from 'material-ui/Button'
import Paper from 'material-ui/Paper'
import Typography from 'material-ui/Typography'
import VisibilityOff from 'material-ui-icons/VisibilityOff'

import PlayerNameSubtitle from './playerNameSubtitle.jsx'
import * as calc from '../../utils/calculated'
import { fullChar } from '../../utils/propTypes'

const styles = theme => ({
  root: theme.mixins.gutters({
    paddingTop: 16,
    paddingBottom: 16,
  }),
  hiddenLabel: {
    ...theme.typography.caption,
    display: 'inline-block',
    marginLeft: theme.spacing.unit
  },
})

function CharacterCard({ character, classes }) {
  const woundPenalty = calc.woundPenalty(character)

  return <Paper className={ classes.root }>

    <Typography variant="title">
      { character.name }
      { character.hidden &&
        <div className={ classes.hiddenLabel }>
          <VisibilityOff />
          Hidden
        </div>
      }

      <Button component={ Link } to={ `/characters/${character.id}` } style={{ float: 'right', }}>
        Full Sheet
      </Button>
    </Typography>

    <PlayerNameSubtitle playerId={ character.player_id } />

    <Typography paragraph>
      Essence { character.essence } { calc.prettyFullExaltType(character) }
    </Typography>

    <Typography>
      { character.motes_personal_total > 0 &&
        <span>
          Motes: { character.motes_personal_current }/{ character.motes_personal_total } Personal,&nbsp;
        </span>
      }
      { character.motes_peripheral_total > 0 &&
        <span>
          { character.motes_peripheral_current }/{ character.motes_peripheral_total } Peripheral,&nbsp;
        </span>
      }
      Willpower: { character.willpower_temporary }/{ character.willpower_permanent }
    </Typography>

    <Typography>
      Evasion: { calc.evasionRaw(character) },&nbsp;
      Soak: { calc.naturalSoak(character) + calc.armorSoak(character) }
    </Typography>

    <Typography>
      { /* TODO: penalties, specialties */}
      Resolve: { calc.resolveRaw(character) },&nbsp;
      Guile:   { calc.guileRaw(character) },&nbsp;
      Appearance: { character.attr_appearance }
    </Typography>

    <Typography paragraph>
      <strong>Penalties:</strong>&nbsp;
      Mobility -{ calc.mobilityPenalty(character) },&nbsp;<commit_msg>Add Anima level to character dashboard<commit_after>import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'

import { withStyles } from 'material-ui/styles'
import Button from 'material-ui/Button'
import Paper from 'material-ui/Paper'
import Typography from 'material-ui/Typography'
import VisibilityOff from 'material-ui-icons/VisibilityOff'

import PlayerNameSubtitle from './playerNameSubtitle.jsx'
import * as calc from '../../utils/calculated'
import { fullChar } from '../../utils/propTypes'

const styles = theme => ({
  root: theme.mixins.gutters({
    paddingTop: 16,
    paddingBottom: 16,
  }),
  hiddenLabel: {
    ...theme.typography.caption,
    display: 'inline-block',
    marginLeft: theme.spacing.unit
  },
})

function CharacterCard({ character, classes }) {
  const woundPenalty = calc.woundPenalty(character)

  return <Paper className={ classes.root }>

    <Typography variant="title">
      { character.name }
      { character.hidden &&
        <div className={ classes.hiddenLabel }>
          <VisibilityOff />
          Hidden
        </div>
      }

      <Button component={ Link } to={ `/characters/${character.id}` } style={{ float: 'right', }}>
        Full Sheet
      </Button>
    </Typography>

    <PlayerNameSubtitle playerId={ character.player_id } />

    <Typography paragraph>
      Essence { character.essence } { calc.prettyFullExaltType(character) }
    </Typography>

    { character.type != 'Character' &&
      <Typography>
        Animal Level: { calc.prettyAnimaLevel(character) }
      </Typography>
    }

    <Typography>
      { character.motes_personal_total > 0 &&
        <span>
          Motes: { character.motes_personal_current }/{ character.motes_personal_total } Personal,&nbsp;
        </span>
      }
      { character.motes_peripheral_total > 0 &&
        <span>
          { character.motes_peripheral_current }/{ character.motes_peripheral_total } Peripheral,&nbsp;
        </span>
      }
      Willpower: { character.willpower_temporary }/{ character.willpower_permanent }
    </Typography>

    <Typography>
      Evasion: { calc.evasionRaw(character) },&nbsp;
      Soak: { calc.naturalSoak(character) + calc.armorSoak(character) }
    </Typography>

    <Typography>
      { /* TODO: penalties, specialties */}
      Resolve: { calc.resolveRaw(character) },&nbsp;
      Guile:   { calc.guileRaw(character) },&nbsp;
      Appearance: { character.attr_appearance }
    </Typography>

    <Typography paragraph>
      <strong>Penalties:</strong>&nbsp;
      Mobility -{ calc.mobilityPenalty(character) },&nbsp;
{'fraction_non_alphanumeric': 0.132309509746013, 'fraction_numerical': 0.002362669816893089, 'mean_word_length': 3.054269752593775, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 59, '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': '1084851', 'n_tokens_mistral': 1562, 'n_tokens_neox': 1509, 'n_words': 309}