<?php

declare(strict_types=1);

use apexl\Io\includes\RouteManager;
use apexl\Io\modules\menu\controllers\NavGroupsController;
use apexl\Io\modules\user\enums\permissions\Common;

/** @var RouteManager $routeManager */

// Phase 5 (quiet mode) — catalogue of the current user's permission-gated
// top-level nav groups, unfiltered by any NavFilterInterface. Consumed by
// nav-allowlist picker UIs (workspace admin checklist, per-user
// "Simplify my navigation" picker) to build their options list.
$routeManager->get(
    'menu.nav-groups.index',
    '/api/v1/menu/nav-groups',
    NavGroupsController::class . '::index'
);
$routeManager->addRouteArg('menu.nav-groups.index', 'permission', serialize(Common::IS_LOGGED_IN));
