import * as React from "react";
import { IProductItem } from "../../../../apiModels/ViewModels";

type AddToCartIconProps = {
	product: IProductItem,
	onAddToCartClick(productId: number, amount: number): void
}

export const AddToCartIcon = ({ product, onAddToCartClick }: AddToCartIconProps) => {
	return (
		<ul className="featured__item__pic__hover">
			{/*<li><a href="#"><i className="fa fa-heart"></i></a></li>*/}
			{/*<li><a href="#"><i className="fa fa-retweet"></i></a></li>*/}
			<li>
				<button onMouseDown={() => onAddToCartClick(product.id, 1)} title="Vložit položku do košíku">
					<i className="fa fa-shopping-cart"></i>
				</button>
			</li>
		</ul>
	);
}
