<?php
namespace Leadlion\AutogedalWarehouses\Model\Rule\Condition;

use Magento\CatalogRule\Model\Rule\Condition\Product as MagentoProductCondition;
use Magento\Catalog\Model\ProductCategoryList;

class Combine extends MagentoProductCondition
{
    public function __construct(
        \Magento\Rule\Model\Condition\Context $context,
        \Magento\Backend\Helper\Data $backendData,
        \Magento\Eav\Model\Config $config,
        \Magento\Catalog\Model\ProductFactory $productFactory,
        \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
        \Magento\Catalog\Model\ResourceModel\Product $productResource,
        \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $attrSetCollection,
        \Magento\Framework\Locale\FormatInterface $localeFormat,
        array $data = [],
        ProductCategoryList $categoryList = null
    ) {
        parent::__construct(
            $context,
            $backendData,
            $config,
            $productFactory,
            $productRepository,
            $productResource,
            $attrSetCollection,
            $localeFormat,
            $data,
            $categoryList
        );
    }

    public function getNewChildSelectOptions()
    {
        $conditions = parent::getNewChildSelectOptions();
        
        $conditions[] = [
            'value' => \Leadlion\AutogedalWarehouses\Model\Rule\Condition\GreutateAttribute::class,
            'label' => __('Greutate')
        ];

        return $conditions;
    }
}