<?php

declare(strict_types=1);

use Apexl\Io\Menu\Controllers\NavGroupsController;
use Apexl\Io\User\Enums\Permissions\Common;
use Apexl\Io\User\Middleware\RoutePermissionMiddleware;

// 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.
$this->get('/api/v1/menu/nav-groups', NavGroupsController::class . '::index')
    ->setName('menu.nav-groups.index')->add(new RoutePermissionMiddleware(Common::IS_LOGGED_IN));
