<?php

declare(strict_types=1);

use App\Support\Tenants\TenantPageCategory;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

it('classifies in-scope admin routes into canonical page categories', function (string $path, TenantPageCategory $expected): void {
    expect(TenantPageCategory::fromPath($path))->toBe($expected);
})->with([
    'workspace overview' => ['/admin', TenantPageCategory::WorkspaceScoped],
    'workspace chooser exception' => ['/admin/choose-workspace', TenantPageCategory::WorkspaceChooserException],
    'tenant chooser' => ['/admin/choose-tenant', TenantPageCategory::WorkspaceScoped],
    'tenant detail' => ['/admin/tenants/tenant-123', TenantPageCategory::TenantBound],
    'tenant panel route' => ['/admin/t/tenant-123', TenantPageCategory::TenantBound],
    'tenant scoped evidence detail' => ['/admin/evidence/123', TenantPageCategory::TenantScopedEvidence],
    'evidence overview' => ['/admin/evidence/overview', TenantPageCategory::WorkspaceScoped],
    'onboarding index' => ['/admin/onboarding', TenantPageCategory::OnboardingWorkflow],
    'onboarding draft' => ['/admin/onboarding/42', TenantPageCategory::OnboardingWorkflow],
    'operations index' => ['/admin/operations', TenantPageCategory::WorkspaceScoped],
    'operation run detail' => ['/admin/operations/44', TenantPageCategory::CanonicalWorkspaceRecordViewer],
]);
