<?php

declare(strict_types=1);

use FiloBlu\Refilo\Helper\Catalog\ProductAttributeHelper;
use FiloBlu\Refilo\Remote\Entity\Product;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\App\Area;
use Magento\Framework\App\Bootstrap;
use Magento\Framework\App\State;

require __DIR__ . '/../../../../../app/bootstrap.php';
$params = $_SERVER;
$bootstrap = Bootstrap::create(BP, $params);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get(State::class);
$state->setAreaCode(Area::AREA_CRONTAB);


/** @var ProductRepositoryInterface $productRepository */
$productRepository = $objectManager->get(ProductRepositoryInterface::class);
$product = $productRepository->get('232MMOKN002_23249MO_0053', false, 1);

/** @var  \FiloBlu\Refilo\Helper\Catalog\ProductAttributeHelper $helper */
$helper = $objectManager->create(ProductAttributeHelper::class);

$productRefilo = new Product();

$result = $helper->getFilterableAttributesWithChildren($product);

print_r($result);





