<?php

namespace Shm\ShmUtils\ShmDoctor\ClassGenerator;

use PhpSchool\CliMenu\Builder\CliMenuBuilder;
use Shm\Collection\Collection;

class CollectionsUtils
{
    public static function menu(): void
    {
        $menu = (new CliMenuBuilder())
            ->setTitle('Выберите действие')
            ->addItem('Коллекции без display параметра', function () {

                $structures = \Shm\ShmUtils\ShmDoctor\Utils\StructureHelper::getStructures();

                foreach ($structures as $structure) {


                    if ($structure::structure()->hasTrueValueDeep('display')) {
                        continue;
                    }

                    echo $structure->collection . PHP_EOL;
                }

                exit;
            })

            ->build();

        $menu->open();
    }
}
