<?php

declare(strict_types=1);

namespace FiloBlu\ExtBlackbirdMenuManager\View\Element\Block;

use FiloBlu\ExtBlackbirdMenuManager\Model\ResourceModel\Group\CollectionFactory;
use Magento\Framework\View\Element\Block\ArgumentInterface;

/**
 *
 */
class CustomerGroupArgument implements ArgumentInterface
{
    /**
     * @var \FiloBlu\ExtBlackbirdMenuManager\Model\ResourceModel\Group\CollectionFactory
     */
    private $collectionFactory;

    /**
     * @param \FiloBlu\ExtBlackbirdMenuManager\Model\ResourceModel\Group\CollectionFactory $collectionFactory
     */
    public function __construct(
        CollectionFactory $collectionFactory
    ) {
        $this->collectionFactory = $collectionFactory;
    }

    /**
     * @return array
     */
    public function getCustomerGroups()
    {
        return $this->collectionFactory->create()->toOptionArray();
    }
}