@model SecondaryLoginViewModel
@{
    ViewData["Title"] = "Two-factor/U2F authentication";
}

<section>
    <div class="container">
        @if (Model.LoginWith2FaViewModel != null && Model.LoginWithU2FViewModel != null)
        {
            <div class="row">
                <div class="col-lg-12 text-center">
                    <h2 class="section-heading">@ViewData["Title"]</h2>
                    <hr class="primary">
                    
                    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
                </div>
            </div>
        }else if (Model.LoginWith2FaViewModel == null && Model.LoginWithU2FViewModel == null)
        {
            <div class="row">
                <div class="col-lg-12 text-center">
                    <h2 class="section-heading bg-danger">Both 2FA and U2F Authentication Methods are not available. Please go to the https endpoint</h2>
                    <hr class="danger">
                </div>
            </div>
        }
        
        
        <div class="row justify-content-center">
            @if (Model.LoginWith2FaViewModel != null)
            {
                <div class="col-sm-12 col-md-6">
                    <partial name="Loginwith2fa" model="@Model.LoginWith2FaViewModel"/>
                </div>
            }
            @if (Model.LoginWithU2FViewModel != null)
            {
                <div class="col-sm-12 col-md-6">
                    <partial name="LoginWithU2F" model="@Model.LoginWithU2FViewModel"/>
                </div>
            }
        </div>
    </div>
</section>
@section Scripts {
    @await Html.PartialAsync("_ValidationScriptsPartial")
}
