<?php

namespace CouponsPlus\App\Coupon\Tree\Abilities;

use CouponsPlus\App\Coupon\Tree\ItemSetsToDiscount\ProductDiscountOptions;

/**
 *
 * Could be a product id, a filters map, etc.
 *
 * @template T
 */
interface ItemToDiscount
{
    /**
     * For specific products, this is the product's id, for filters, this is the filters map etc.
     * @return T
     */
    public function getSubject();
    public function getDiscountOptions(): ProductDiscountOptions;
    public function canBeAutomaticallyAddedToTheCart(): bool;

    /**
     * For cases like when the product is out of stock and cannot be added
     * to the cart either automatically or manually, in such cases, don't display a notification, etd
     */
    public function canBeManuallyAddedToTheCart(): bool;

}