<Fluxor.Blazor.Web.StoreInitializer />
<CascadingAuthenticationState>
	<CascadingBlazoredModal>
		<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
			<Found Context="routeData">
				<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(AdminLayout)" >
					<NotAuthorized>
						@if (!context.User.Identity.IsAuthenticated)
						{
							<RedirectToLogin />
						}
						else
						{
							<p>
								You are not authorized to acces this resource.
							</p>
						}
					</NotAuthorized>
				</AuthorizeRouteView>
			</Found>
			<NotFound>
				<LayoutView Layout="@typeof(MainLayout)">
					<p class="alert-warning text-center">Sorry, there's nothing at this address.</p>
				</LayoutView>
			</NotFound>
		</Router>
	</CascadingBlazoredModal>
</CascadingAuthenticationState>