'use client';
import AddToCartButton from './AddToCartButton';

interface Props {
  variantId: string;
  productId: string;
  productName: string;
  priceCents: number;
  imageUrl?: string;
  available: boolean;
  /** F-138: available stock for the variant. */
  availableQuantity?: number;
  minPurchaseQty?: number;
}

export default function ProductAddToCart({ variantId, productId, productName, priceCents, imageUrl, available, availableQuantity, minPurchaseQty }: Props) {
  return (
    <div className="mt-6">
      <AddToCartButton
        variantId={variantId}
        productId={productId}
        productName={productName}
        priceCents={priceCents}
        imageUrl={imageUrl}
        available={available}
        availableQuantity={availableQuantity}
        minPurchaseQty={minPurchaseQty}
        className="w-full sm:w-auto"
      />
    </div>
  );
}
