import React from 'react';
import Image from 'next/image';
import Link from "next/link";
import {ButtonImg, Button } from '../../../../../UI';
import classNames from 'classnames';

type PizzaBlockProps = {
  id: number;
  title: string;
  heft_trad: number;
  description: string;
  img_trad: string;
};

export const PizzaBlock: React.FC<PizzaBlockProps> = ({
  id,
  title,
  img_trad,
  heft_trad,
  description,
}) => {

  const onClickAdd = () => {
    console.log('ok');
  };

  return (
          <li className={classNames("vendor-item product_card")}>
            <div className='vendor-item__link'>
                <Image
                    src={'/assets/img/'+img_trad}
                    alt={title}
                    width={400}
                    height={400}
                />
            </div>
            <span className={'product_card_box'} >
                <h3>{title}</h3>
                <p className={'product_card_text'}>{description}</p>
                <span className={'product_card_video'}>
                    <ButtonImg img={'video'} onClick={() => onClickAdd()}>Видос</ButtonImg>
                </span>
                <span className={'product_card_footer'}>
                    <p className={'product_card_price'}>от {heft_trad} руб</p>
                    <Link href={"/?pizza="+id} as={"/"+id} scroll={false}  className={classNames('yelow button_size_32')}>
                      <button
                         
                      >Добавить
                      </button>
                      </Link>
                </span>
            </span>
        </li>
  );
};


