<?php

namespace CouponsPlus\App\Handlers;

use CouponsPlus\App\Offers\BuiltIn\BuyXGetX;
use CouponsPlus\App\Offers\BuiltIn\BuyXGetY;
use CouponsPlus\App\Offers\BuiltIn\Discount;
use CouponsPlus\App\Offers\BuiltIn\ShippingDiscount;
use CouponsPlus\App\Offers\OffersRegistrator;
use CouponsPlus\Original\Events\Handler\EventHandler;
use CouponsPlus\App\Offers\BuiltIn\FixedPriceInternal;
use CouponsPlus\App\Conditions\Stubs\Offers\BundlePrice;
use CouponsPlus\App\Conditions\Stubs\Offers\PricePerItem;

#[\AllowDynamicProperties]
Class BuiltInOffersRegistratorHandler extends EventHandler
{
    protected $numberOfArguments = 1;
    protected $priority = 10;

    public function execute(OffersRegistrator $offersRegistrator)
    {
        /**
         * New in 3.0
         */
        $offersRegistrator->register(BuyXGetX::class);
        $offersRegistrator->register(BuyXGetY::class);
        /**
         * Older
         */
        $offersRegistrator->register(Discount::class);
        $offersRegistrator->register(ShippingDiscount::class);
        /**
         * Internal use only.
         */
        $offersRegistrator->register(FixedPriceInternal::class);

        /**++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
         * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
         *
         *             -----------  NOT IMPLEMENTED -----------
         *
        +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**
         *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
        $offersRegistrator->registerStub(PricePerItem::class);
        $offersRegistrator->registerStub(BundlePrice::class);
    }
}