<?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('MMSL00376-FA450001-1000', false, 1);

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

$result =$helperFilters->getFilterableAttributesWithChildrenWithoutOutOfStock($product);

print_r($result);





