<?php

declare(strict_types=1);

namespace Autogedal\PromoRules\Model\Config\Source;

use Autogedal\PromoRules\Model\Rule\DiscountScope;
use Magento\Framework\Data\OptionSourceInterface;

/**
 * Source model for the admin discount-blocking scope selector.
 */
class BlockDiscountScope implements OptionSourceInterface
{
    public function toOptionArray(): array
    {
        return [
            [
                'value' => DiscountScope::NONE,
                'label' => __('No blocking'),
            ],
            [
                'value' => DiscountScope::CATALOG_DISCOUNTS,
                'label' => __('Special price and catalog rule discounts only'),
            ],
            [
                'value' => DiscountScope::FREE_GIFTS,
                'label' => __('Free gifts only'),
            ],
            [
                'value' => DiscountScope::CATALOG_DISCOUNTS_AND_FREE_GIFTS,
                'label' => __('Special price, catalog rule discounts, and free gifts'),
            ],
            [
                'value' => DiscountScope::ALL_DISCOUNTS,
                'label' => __('All discounted items'),
            ],
        ];
    }
}
