import * as React from 'react' ; import { Strategies } from '../../../common/types' ; import StrategyButton from '../../atoms/strategy-button/Component' ; interface IStrategyPlateProps { onStrategyChange : ( strategy : Strategies ) => void ; selectedStrategy : Strategies | null ; } export default class StrategyPlate extends React . Component < IStrategyPlateProps , { } > { public render ( ) { const { selectedStrategy } = this . props ; return ( < div className = "strategy-plate u-plate" > < div className = "strategy-plate__title" > Select VIBES Version < /div> < div className = "strategy-plate__content" > < StrategyButton onClick = { ( ) => this . handleOnClickStrategy ( Strategies . GENERIC_SIMULATION ) } title = "VIBES Simulator V1" selected = { selectedStrategy === Strategies . GENERIC_SIMULATION } /> < StrategyButton onClick = { ( ) => this . handleOnClickStrategy ( Strategies . BITCOIN_LIKE_BLOCKCHAIN ) } title = "VIBES Simulator V2 with Attacks" selected = { selectedStrategy === Strategies . BITCOIN_LIKE_BLOCKCHAIN } /> { } { } { } { } { } { } { } { } { } { } < /div> < /div>); } private handleOnClickStrategy ( strategy ) { this . props . onStrategyChange ( strategy ) ; } }