@using Indotalent.ConfigBackEnd.Interfaces
@using Indotalent.Features.Account.AccessDenied
@using Indotalent.Features.Root.NotFound
@using Microsoft.AspNetCore.Components.Authorization


<CascadingAuthenticationState>
    <Router AppAssembly="typeof(Program).Assembly" NotFoundPage="typeof(NotFound.NotFoundPage)">
        <Found Context="routeData">
            <AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(Root.MainLayout)">
                <NotAuthorized>
                    <RedirectToAccessDenied />
                </NotAuthorized>
                <Authorizing>
                    <div class="d-flex align-center justify-center mt-16">
                        <MudProgressCircular Color="Color.Primary" Indeterminate="true" />
                        <MudText Class="ml-3">Memverifikasi identitas...</MudText>
                    </div>
                </Authorizing>
            </AuthorizeRouteView>
            <FocusOnNavigate RouteData="routeData" Selector="h1" />
        </Found>
    </Router>
</CascadingAuthenticationState>

