import * as React from 'react' ; import { MAX_COUNTER_HEALTH } from '../../Constants' ; import { healthCounter , romanize } from '../../helpers' ; import { CardType } from '../../reducers/StateTypes' ; export default class CardBack extends React . Component < CardType , { } > { public render ( ) { const card = this . props . card ; switch ( card . sheet ) { case '-Title' : return ( < div className = { `card back vertical ${ card . sheet } title-${ card . image }` } > < div className = "contents" > < /div> < /div>); case 'Ability' : return ( < div className = { `card back vertical ${ card . classicon || card . class } ${ card . sheet }` } > < div className = "contents" > { card . naming && < div className = "naming" > { card . naming } < /div>} < /div> < /div>); case 'Adventurer' : return ( < div className = { `card back horizontal ${ card . classicon || card . class } ${ card . sheet }` } > < div className = "contents" > { card . naming && < div className = "naming" > { card . naming } < /div>} < /div> < /div>); case 'Encounter' : return ( < div className = { `card back dark horizontal ${ card . classicon || card . class } ${ card . sheet } tier${ card . tier }` } > < div className = "contents" > { healthCounter ( MAX_COUNTER_HEALTH , true ) } { card . naming && < div className = "naming" > { card . naming } < /div>} < div className = "tier" > { romanize ( card . tier ) } < /div> < /div> < /div>); case 'Helper' : return ( < div className = { `card back vertical ${ card . sheet }` } > < div className = "contents" > < /div> < /div>); case 'Loot' : return ( < div className = { `card back vertical ${ card . sheet } tier${ card . tier }` } > < div className = "contents" > < div className = "tier" > { romanize ( card . tier ) } < /div> { card . naming && < div className = "naming" > { card . naming } < /div>} < /div> < /div>); case 'Persona' : return ( < div className = { `card back horizontal ${ card . sheet }` } > < div className = "contents" > { card . naming && < div className = "naming" > { card . naming } < /div>} < /div> < /div>); case 'Skill' : return ( < div className = { `card back horizontal ${ card . sheet }` } > < div className = "contents" > < /div> < /div>); default : return null ; } } }