@page "/logout"
@inherits LocalizableComponentBase
<Title>@Localizer["Logout"]</Title>

<section class="block relative w-full h-full neomorphInset is-nxsmall rounded-xl">

	<div class="flex flex-col space-y-4 p-4 md:p-5 w-full h-full absolute overflow-y-auto">
		<h1 class="text-center">@Localizer["Logging out..."]</h1>
	</div>

</section>

@code {
	[CascadingParameter] CascadingState CascadingState { get; set; }
	//[Inject] TokenAuthStateProvider AuthStateProvider { get; set; }
	[Inject] SignOutSessionStateManager SignOutSessionStateManager { get; set; }
	[Inject] NavigationManager Navigation { get; set; }

	protected override async Task OnInitializedAsync()
	{
		//await AuthStateProvider.LogoutAsync(true);
		await SignOutSessionStateManager.SetSignOutState();
		Navigation.NavigateTo("authenticatio/logout");
	}
}
