import React, { PureComponent } from 'react';
import { Image, StyleSheet, Text, View } from 'react-native';
const DEFAULT_CART_IMAGE = require('../../assets/images/cart.png');
const styles = StyleSheet.create({
    container: {
        width: 33,
        height: 33,
        padding: 4
    },
    image: {
        height: 25,
        width: 25
    },
    text: {
        color: 'white',
        position: 'absolute',
        padding: 1,
        borderRadius: 7,
        backgroundColor: 'red',
        fontSize: 10,
        width: 14,
        height: 14,
        textAlign: 'center',
        overflow: 'hidden'
    },
    topLeft: {
        top: 0,
        left: 0
    },
    topRight: {
        top: 0,
        right: 0
    },
    bottomLeft: {
        bottom: 0,
        left: 0
    },
    bottomRight: {
        bottom: 0,
        right: 0
    },
    center: {
        alignSelf: 'center',
        marginTop: 8
    }
});
export class CartCount extends PureComponent {
    render() {
        const textPosition = this.props.textPosition || 'center';
        return (<View style={[styles.container, this.props.style]}>
        <Image resizeMode='contain' style={[styles.image, this.props.cartImageStyle]} source={this.props.cartImage || DEFAULT_CART_IMAGE}/>
        {this.props.count && (<Text style={[styles.text, styles[textPosition], this.props.textStyle]}>
            {this.props.count}
          </Text>)}
      </View>);
    }
}
//# sourceMappingURL=CartCount.js.map