<?php

declare(strict_types=1);

namespace Apexl\Io\Display\ComponentFactories;

use Apexl\Io\Component\Factories\GenericComponentFactory;
use Apexl\Io\Display\Components\FilterableMenus;

final readonly class FilterableMenusComponentFactory
{
    public function __construct(private GenericComponentFactory $componentFactory) {}

    public function make(array $menus, bool $filterable = false): FilterableMenus
    {
        return $this->componentFactory->make(FilterableMenus::class)
            ->setMenus($menus)
            ->setFilterable($filterable);
    }
}
