import React, { Component } from 'react';
import { Image, StyleSheet, TouchableOpacity } from 'react-native';
const heartIcon = require('../../../../assets/images/heartIcon.png');
const style = StyleSheet.create({
    favButtonContainer: {
        position: 'absolute',
        top: 5,
        right: 5
    },
    favButton: {
        width: 30,
        height: 30
    }
});
export class ProductItemFavoriteButton extends Component {
    render() {
        const { renderFavButton, onFavButtonPress, favButtonImage } = this.props;
        if (renderFavButton) {
            return renderFavButton();
        }
        if (!onFavButtonPress) {
            return null;
        }
        return (<TouchableOpacity accessibilityLabel='Toggle Favorite' onPress={onFavButtonPress} style={style.favButtonContainer}>
        <Image resizeMode='contain' source={favButtonImage || heartIcon} style={style.favButton}/>
      </TouchableOpacity>);
    }
}
//# sourceMappingURL=ProductItemFavoriteButton.js.map