#pragma checksum "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "180068b67c9b104e4f3d90e6d4c58daac209b5b4"
// <auto-generated/>
#pragma warning disable 1591
namespace SPWA.LoginFeatures.Account.Pages
{
    #line hidden
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Components;
#nullable restore
#line 2 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using System.Net.Http;

#line default
#line hidden
#nullable disable
#nullable restore
#line 3 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using Microsoft.AspNetCore.Authorization;

#line default
#line hidden
#nullable disable
#nullable restore
#line 4 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using Microsoft.AspNetCore.Components.Authorization;

#line default
#line hidden
#nullable disable
#nullable restore
#line 5 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using Microsoft.AspNetCore.Components.Forms;

#line default
#line hidden
#nullable disable
#nullable restore
#line 6 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using Microsoft.AspNetCore.Components.Routing;

#line default
#line hidden
#nullable disable
#nullable restore
#line 7 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using Microsoft.AspNetCore.Components.Web;

#line default
#line hidden
#nullable disable
#nullable restore
#line 8 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using Microsoft.JSInterop;

#line default
#line hidden
#nullable disable
#nullable restore
#line 9 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using SPWA;

#line default
#line hidden
#nullable disable
#nullable restore
#line 10 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using SPWA.Shared;

#line default
#line hidden
#nullable disable
#nullable restore
#line 11 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using MatBlazor;

#line default
#line hidden
#nullable disable
#nullable restore
#line 12 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using BlazorInputFile;

#line default
#line hidden
#nullable disable
#nullable restore
#line 13 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using Microsoft.AspNetCore.Identity;

#line default
#line hidden
#nullable disable
#nullable restore
#line 14 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using Microsoft.AspNetCore.DataProtection;

#line default
#line hidden
#nullable disable
#nullable restore
#line 15 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\_Imports.razor"
using SPWA.LoginFeatures.Account.Pages.GoogleLogin;

#line default
#line hidden
#nullable disable
#nullable restore
#line 3 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
using SPWA.LoginFeatures.Account.Shared;

#line default
#line hidden
#nullable disable
#nullable restore
#line 4 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
using SPWA.DataAccess.Data;

#line default
#line hidden
#nullable disable
#nullable restore
#line 7 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
using System.ComponentModel.DataAnnotations;

#line default
#line hidden
#nullable disable
    [Microsoft.AspNetCore.Components.LayoutAttribute(typeof(SigninLayout))]
    [Microsoft.AspNetCore.Components.RouteAttribute("/account/Register")]
    public partial class Register : Microsoft.AspNetCore.Components.ComponentBase
    {
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenComponent<MatBlazor.MatCard>(0);
            __builder.AddAttribute(1, "ChildContent", (Microsoft.AspNetCore.Components.RenderFragment)((__builder2) => {
                __builder2.AddMarkupContent(2, "\r\n    ");
                __builder2.AddMarkupContent(3, "<div class=\"logo\">\r\n        <img src=\"~/Images/FIU_VIP.png\"><br>FIU Senior Web App\r\n        <br>\r\n        <h4>Create Account</h4>\r\n    </div>\r\n\r\n    ");
                __builder2.OpenComponent<Microsoft.AspNetCore.Components.Forms.EditForm>(4);
                __builder2.AddAttribute(5, "Model", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Object>(
#nullable restore
#line 17 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                      registerAccountModel

#line default
#line hidden
#nullable disable
                ));
                __builder2.AddAttribute(6, "OnValidSubmit", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Forms.EditContext>>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Forms.EditContext>(this, 
#nullable restore
#line 17 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                            RegisterUser

#line default
#line hidden
#nullable disable
                )));
                __builder2.AddAttribute(7, "ChildContent", (Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Forms.EditContext>)((context) => (__builder3) => {
                    __builder3.AddMarkupContent(8, "\r\n        ");
                    __builder3.OpenComponent<Microsoft.AspNetCore.Components.Forms.DataAnnotationsValidator>(9);
                    __builder3.CloseComponent();
                    __builder3.AddMarkupContent(10, "\r\n        ");
                    __builder3.OpenComponent<Microsoft.AspNetCore.Components.Forms.ValidationSummary>(11);
                    __builder3.CloseComponent();
                    __builder3.AddMarkupContent(12, "\r\n        ");
                    __builder3.OpenElement(13, "fieldset");
                    __builder3.AddMarkupContent(14, "\r\n\r\n            ");
                    __builder3.OpenElement(15, "div");
                    __builder3.AddAttribute(16, "class", "form-group");
                    __builder3.AddMarkupContent(17, "\r\n                ");
                    __builder3.OpenComponent<MatBlazor.MatTextField>(18);
                    __builder3.AddAttribute(19, "Label", "Email");
                    __builder3.AddAttribute(20, "Icon", "mail_outline");
                    __builder3.AddAttribute(21, "IconTrailing", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 23 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                        true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(22, "FullWidth", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 23 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                                         true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(23, "Required", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 23 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                                                         true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(24, "Value", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.String>(
#nullable restore
#line 23 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                            registerAccountModel.Email

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(25, "ValueChanged", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<Microsoft.AspNetCore.Components.EventCallback<System.String>>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create<System.String>(this, Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => registerAccountModel.Email = __value, registerAccountModel.Email))));
                    __builder3.AddAttribute(26, "ValueExpression", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Linq.Expressions.Expression<System.Func<System.String>>>(() => registerAccountModel.Email));
                    __builder3.CloseComponent();
                    __builder3.AddMarkupContent(27, "\r\n            ");
                    __builder3.CloseElement();
                    __builder3.AddMarkupContent(28, "\r\n            ");
                    __builder3.OpenElement(29, "div");
                    __builder3.AddAttribute(30, "class", "form-group");
                    __builder3.AddMarkupContent(31, "\r\n                ");
                    __builder3.OpenComponent<MatBlazor.MatTextField>(32);
                    __builder3.AddAttribute(33, "Label", "Password");
                    __builder3.AddAttribute(34, "Icon", "lock_outline");
                    __builder3.AddAttribute(35, "IconTrailing", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 26 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                              true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(36, "FullWidth", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 26 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                                               true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(37, "Required", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 26 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                                                               true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(38, "Type", "password");
                    __builder3.AddAttribute(39, "Value", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.String>(
#nullable restore
#line 26 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                            registerAccountModel.Password

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(40, "ValueChanged", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<Microsoft.AspNetCore.Components.EventCallback<System.String>>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create<System.String>(this, Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => registerAccountModel.Password = __value, registerAccountModel.Password))));
                    __builder3.AddAttribute(41, "ValueExpression", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Linq.Expressions.Expression<System.Func<System.String>>>(() => registerAccountModel.Password));
                    __builder3.CloseComponent();
                    __builder3.AddMarkupContent(42, "\r\n            ");
                    __builder3.CloseElement();
                    __builder3.AddMarkupContent(43, "\r\n            ");
                    __builder3.OpenElement(44, "div");
                    __builder3.AddAttribute(45, "class", "form-group");
                    __builder3.AddMarkupContent(46, "\r\n                ");
                    __builder3.OpenComponent<MatBlazor.MatTextField>(47);
                    __builder3.AddAttribute(48, "Label", "Password Confirmation");
                    __builder3.AddAttribute(49, "Icon", "lock_outline");
                    __builder3.AddAttribute(50, "IconTrailing", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 29 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                                                  true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(51, "FullWidth", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 29 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                                                                   true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(52, "Required", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 29 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                                                                                                                                                   true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(53, "Type", "password");
                    __builder3.AddAttribute(54, "Value", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.String>(
#nullable restore
#line 29 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                            registerAccountModel.ConfirmPassword

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(55, "ValueChanged", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<Microsoft.AspNetCore.Components.EventCallback<System.String>>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create<System.String>(this, Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => registerAccountModel.ConfirmPassword = __value, registerAccountModel.ConfirmPassword))));
                    __builder3.AddAttribute(56, "ValueExpression", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Linq.Expressions.Expression<System.Func<System.String>>>(() => registerAccountModel.ConfirmPassword));
                    __builder3.CloseComponent();
                    __builder3.AddMarkupContent(57, "\r\n            ");
                    __builder3.CloseElement();
                    __builder3.AddMarkupContent(58, "\r\n            ");
                    __builder3.OpenElement(59, "div");
                    __builder3.AddAttribute(60, "class", "form-group d-flex justify-content-end");
                    __builder3.AddMarkupContent(61, "\r\n                ");
                    __builder3.OpenComponent<MatBlazor.MatButton>(62);
                    __builder3.AddAttribute(63, "Type", "submit");
                    __builder3.AddAttribute(64, "Raised", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Boolean>(
#nullable restore
#line 32 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
                                                 true

#line default
#line hidden
#nullable disable
                    ));
                    __builder3.AddAttribute(65, "ChildContent", (Microsoft.AspNetCore.Components.RenderFragment)((__builder4) => {
                        __builder4.AddContent(66, "Create account");
                    }
                    ));
                    __builder3.CloseComponent();
                    __builder3.AddMarkupContent(67, "\r\n            ");
                    __builder3.CloseElement();
                    __builder3.AddMarkupContent(68, "\r\n            <hr>\r\n            ");
                    __builder3.OpenComponent<Microsoft.AspNetCore.Components.Routing.NavLink>(69);
                    __builder3.AddAttribute(70, "href", "/Account/SignIn");
                    __builder3.AddAttribute(71, "ChildContent", (Microsoft.AspNetCore.Components.RenderFragment)((__builder4) => {
                        __builder4.AddMarkupContent(72, "\r\n                ");
                        __builder4.AddMarkupContent(73, "<h6 class=\"font-weight-normal text-center\">Already have an account? Click here to login</h6>\r\n            ");
                    }
                    ));
                    __builder3.CloseComponent();
                    __builder3.AddMarkupContent(74, "\r\n        ");
                    __builder3.CloseElement();
                    __builder3.AddMarkupContent(75, "\r\n    ");
                }
                ));
                __builder2.CloseComponent();
                __builder2.AddMarkupContent(76, "\r\n");
            }
            ));
            __builder.CloseComponent();
        }
        #pragma warning restore 1998
#nullable restore
#line 42 "C:\Users\jayt7\Source\Repos\Senior-Project\SPWA\LoginFeatures\Account\Pages\Register.razor"
       

    private RegisterAccountModel registerAccountModel = new RegisterAccountModel();

    private async Task RegisterUser()
    {
        var result = await userManager.CreateAsync(new ApplicationUser { UserName = registerAccountModel.Email, Email = registerAccountModel.Email, EmailConfirmed = true }, registerAccountModel.Password);

        if (result.Succeeded)
        {
            navigationManager.NavigateTo("account/signin");
            return;
        }
    }

    public class RegisterAccountModel
    {
        [Required]
        public string Email { get; set; }
        [Required]
        public string Password { get; set; }
        [Required]
        [Compare(nameof(Password))]
        public string ConfirmPassword { get; set; }
    }

#line default
#line hidden
#nullable disable
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private NavigationManager navigationManager { get; set; }
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private UserManager<ApplicationUser> userManager { get; set; }
    }
}
#pragma warning restore 1591
