<?php

namespace CouponsPlus\App\Coupon\Tree\Abilities;

use CouponsPlus\App\Conditions\ItemsSet;
use CouponsPlus\App\Coupon\Tree\Finders\Sets\OfferItems;

/**
 * Implementing this will signal it is compatible with recursiveness and so it will be rendered as such in the dashboard.
 */
interface OffersItemsSetResolvable
{
    /**
     * This is designed for offers that won't use all the passed items and/or that may need to pick extra items from the cart.
     *
     * So it is expected for this to return two categories of items:
     * - Items to discount with the offer.
     * - Items that were used to make the offer eligible but that should not be discounted
     */
    public function resolveItemsToUse(ItemsSet $filteredItems): OfferItems;
}