@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Routing
@using OpenArchival.Blazor.Components.Account.Shared
@using MudBlazor

<Router AppAssembly="typeof(Program).Assembly"
AdditionalAssemblies="new[] {typeof(OpenArchival.Blazor.AdminPages.ArchiveManagement).Assembly, 
typeof(OpenArchival.Blazor.ArtifactGroupingDisplay.ArchiveGroupingDisplay).Assembly, 
typeof(OpenArchival.Blazor.ArchiveDisplay.ArchiveSearchBar).Assembly,
typeof(OpenArchival.Blazor.Blog.BlogEditor).Assembly}">
    <Found Context="routeData">
        <AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)">
            <NotAuthorized>
                <RedirectToLogin />
            </NotAuthorized>
        </AuthorizeRouteView>
        <FocusOnNavigate RouteData="routeData" Selector="h1" />
    </Found>
</Router>
