import React, { PureComponent } from 'react';
import { Image, Text, TouchableHighlight, View } from 'react-native';
import { style as S } from '../styles/CategoryBox';
export class CategoryBox extends PureComponent {
    constructor() {
        super(...arguments);
        this.handlePress = () => {
            const { onPress } = this.props;
            if (onPress) {
                return onPress(this.props);
            }
        };
    }
    render() {
        const { image, showImage, imageStyle, style, title, titleStyle, underlayColor } = this.props;
        return (<TouchableHighlight style={[S.boxOuter, style]} underlayColor={underlayColor || '#eee'} onPress={this.handlePress}>
        <View style={S.boxInner}>
          {showImage && image && <Image source={image} style={imageStyle}/>}
          <Text style={[S.boxText, titleStyle]}>
            {title}
          </Text>
        </View>
      </TouchableHighlight>);
    }
}
CategoryBox.defaultProps = {
    showImage: true
};
//# sourceMappingURL=CategoryBox.js.map