import { connect } from 'react-redux';

import { isBiddingItem, isWinningItem } from '../../selectors/auctions.js';

import AuctionPriceAndBidCount from '../../components/Auction/BidStatus.js';

function mapStateToProps(state, ownProps) {
    const { itemId } = ownProps;

    return {
        isBidding: isBiddingItem(state, itemId),
        isWinning: isWinningItem(state, itemId),
    };
}

export default connect(
    mapStateToProps,
    null,
)(AuctionPriceAndBidCount);
