#pragma checksum "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor" "{8829d00f-11b8-4213-878b-770e8597ac16}" "b0427f9d0761280391dff6964dd60d0e6f6469df9ec341e22b1b0dfe2bc5c8bf"
// <auto-generated/>
#pragma warning disable 1591
namespace AuthModule.Components.Pages.Auths
{
    #line default
    using global::System;
    using global::System.Collections.Generic;
    using global::System.Linq;
    using global::System.Threading.Tasks;
    using global::Microsoft.AspNetCore.Components;
#nullable restore
#line (2,2)-(2,33) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Auth.Contracts.DTOs.Users

#nullable disable
    ;
#nullable restore
#line (3,2)-(3,32) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Auth.Contracts.DTOs.Auth

#nullable disable
    ;
#nullable restore
#line (4,2)-(4,27) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using AuthModule.Services

#nullable disable
    ;
#nullable restore
#line (5,2)-(5,42) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Microsoft.AspNetCore.Authorization

#nullable disable
    ;
#nullable restore
#line (6,2)-(6,53) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Microsoft.AspNetCore.Components.Authorization

#nullable disable
    ;
#nullable restore
#line (7,2)-(7,28) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using LayoutLib.Components

#nullable disable
    ;
#nullable restore
#line (9,2)-(9,17) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using MudBlazor

#nullable disable
    ;
#nullable restore
#line (10,2)-(10,23) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Auth.Contracts;

#nullable disable
#nullable restore
#line (13,2)-(13,23) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using System.Net.Http

#nullable disable
    ;
#nullable restore
#line (14,2)-(14,28) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using System.Net.Http.Json

#nullable disable
    ;
#nullable restore
#line (15,2)-(15,45) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Microsoft.AspNetCore.Components.Forms

#nullable disable
    ;
#nullable restore
#line (16,2)-(16,47) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Microsoft.AspNetCore.Components.Routing

#nullable disable
    ;
#nullable restore
#line (17,2)-(17,43) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Microsoft.AspNetCore.Components.Web

#nullable disable
    ;
#nullable restore
#line (18,2)-(18,58) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/_Imports.razor"
using Microsoft.AspNetCore.Components.Web.Virtualization

#nullable disable
    ;
    #line default
    #line hidden
    [global::Microsoft.AspNetCore.Components.LayoutAttribute(typeof(
#nullable restore
#line (2,9)-(2,20) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
EmptyLayout

#line default
#line hidden
#nullable disable
    ))]
    [global::Microsoft.AspNetCore.Components.RouteAttribute(
    // language=Route,Component
#nullable restore
#line (1,7)-(1,16) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
"/signUp"

#line default
#line hidden
#nullable disable
    )]
    #nullable restore
    public partial class SignUp : global::Microsoft.AspNetCore.Components.ComponentBase
    #nullable disable
    {
        #pragma warning disable 1998
        protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenComponent<global::Microsoft.AspNetCore.Components.Web.PageTitle>(0);
            __builder.AddAttribute(1, "ChildContent", (global::Microsoft.AspNetCore.Components.RenderFragment)((__builder2) => {
                __builder2.AddContent(2, "Sign Up");
            }
            ));
            __builder.CloseComponent();
            __builder.AddMarkupContent(3, "\r\n\r\n\r\n");
            __builder.OpenComponent<global::Microsoft.AspNetCore.Components.Forms.EditForm>(4);
            __builder.AddComponentParameter(5, nameof(global::Microsoft.AspNetCore.Components.Forms.EditForm.
#nullable restore
#line (9,11)-(9,16) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
Model

#line default
#line hidden
#nullable disable
            ), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Object>(
#nullable restore
#line (9,19)-(9,32) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
registerModel

#line default
#line hidden
#nullable disable
            ));
            __builder.AddComponentParameter(6, nameof(global::Microsoft.AspNetCore.Components.Forms.EditForm.
#nullable restore
#line (9,34)-(9,47) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
OnValidSubmit

#line default
#line hidden
#nullable disable
            ), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Microsoft.AspNetCore.Components.EventCallback<global::Microsoft.AspNetCore.Components.Forms.EditContext>>(global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Forms.EditContext>(this, 
#nullable restore
#line (9,50)-(9,63) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
OnValidSignUp

#line default
#line hidden
#nullable disable
            )));
            __builder.AddComponentParameter(7, "class", "text-gray-600 body-font");
            __builder.AddAttribute(8, "ChildContent", (global::Microsoft.AspNetCore.Components.RenderFragment<global::Microsoft.AspNetCore.Components.Forms.EditContext>)((context) => (__builder2) => {
                __builder2.OpenComponent<global::Microsoft.AspNetCore.Components.Forms.DataAnnotationsValidator>(9);
                __builder2.CloseComponent();
                __builder2.AddMarkupContent(10, "\r\n    ");
                __builder2.OpenComponent<global::Microsoft.AspNetCore.Components.Forms.ValidationSummary>(11);
                __builder2.CloseComponent();
                __builder2.AddMarkupContent(12, "\r\n    ");
                __builder2.OpenElement(13, "div");
                __builder2.AddAttribute(14, "class", "container px-5 py-24 mx-auto flex flex-wrap items-center");
                __builder2.OpenElement(15, "div");
                __builder2.AddAttribute(16, "class", "lg:w-2/6 md:w-1/2 bg-gray-100 rounded-lg p-8 flex flex-col md:ml-auto mx-auto w-full mt-10 md:mt-0");
                __builder2.AddMarkupContent(17, "<h2 class=\"text-gray-900 text-lg font-medium title-font mb-5\">Sign Up</h2>\r\n\r\n            ");
                __builder2.OpenElement(18, "div");
                __builder2.AddAttribute(19, "class", "relative mb-4");
                __builder2.AddMarkupContent(20, "<label for=\"full-name\" class=\"leading-7 text-sm text-gray-600\">Full Name</label>\r\n                ");
                __builder2.OpenElement(21, "input");
                __builder2.AddAttribute(22, "type", "text");
                __builder2.AddAttribute(23, "id", "full-name");
                __builder2.AddAttribute(24, "name", "full-name");
                __builder2.AddAttribute(25, "class", "w-full bg-white rounded border border-gray-300 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out");
                __builder2.AddAttribute(26, "value", global::Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line (19,49)-(19,71) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
registerModel.FullName

#line default
#line hidden
#nullable disable
                ));
                __builder2.AddAttribute(27, "onchange", global::Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => registerModel.FullName = __value, registerModel.FullName));
                __builder2.SetUpdatesAttributeName("value");
                __builder2.CloseElement();
                __builder2.CloseElement();
                __builder2.AddMarkupContent(28, "\r\n\r\n\r\n            ");
                __builder2.OpenElement(29, "div");
                __builder2.AddAttribute(30, "class", "relative mb-4");
                __builder2.AddMarkupContent(31, "<label for=\"email\" class=\"leading-7 text-sm text-gray-600\">Email</label>\r\n                ");
                __builder2.OpenElement(32, "input");
                __builder2.AddAttribute(33, "type", "email");
                __builder2.AddAttribute(34, "id", "email");
                __builder2.AddAttribute(35, "name", "email");
                __builder2.AddAttribute(36, "class", "w-full bg-white rounded border border-gray-300 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out");
                __builder2.AddAttribute(37, "value", global::Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line (26,50)-(26,69) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
registerModel.Email

#line default
#line hidden
#nullable disable
                ));
                __builder2.AddAttribute(38, "onchange", global::Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => registerModel.Email = __value, registerModel.Email));
                __builder2.SetUpdatesAttributeName("value");
                __builder2.CloseElement();
                __builder2.CloseElement();
                __builder2.AddMarkupContent(39, "\r\n\r\n\r\n\r\n            ");
                __builder2.OpenElement(40, "div");
                __builder2.AddAttribute(41, "class", "relative mb-4");
                __builder2.AddMarkupContent(42, "<label for=\"Password\" class=\"leading-7 text-sm text-gray-600\">Password</label>\r\n                ");
                __builder2.OpenElement(43, "input");
                __builder2.AddAttribute(44, "type", "Password");
                __builder2.AddAttribute(45, "id", "Password");
                __builder2.AddAttribute(46, "name", "Password");
                __builder2.AddAttribute(47, "class", "w-full bg-white rounded border border-gray-300 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out");
                __builder2.AddAttribute(48, "value", global::Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line (34,53)-(34,75) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
registerModel.Password

#line default
#line hidden
#nullable disable
                ));
                __builder2.AddAttribute(49, "onchange", global::Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => registerModel.Password = __value, registerModel.Password));
                __builder2.SetUpdatesAttributeName("value");
                __builder2.CloseElement();
                __builder2.CloseElement();
                __builder2.AddMarkupContent(50, "\r\n\r\n\r\n            ");
                __builder2.OpenElement(51, "div");
                __builder2.AddAttribute(52, "class", "relative mb-4");
                __builder2.AddMarkupContent(53, "<label for=\"ConfirmPassword\" class=\"leading-7 text-sm text-gray-600\">Confirm Password</label>\r\n                ");
                __builder2.OpenElement(54, "input");
                __builder2.AddAttribute(55, "type", "password");
                __builder2.AddAttribute(56, "id", "ConfirmPassword");
                __builder2.AddAttribute(57, "name", "ConfirmPassword");
                __builder2.AddAttribute(58, "class", "w-full bg-white rounded border border-gray-300 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out");
                __builder2.AddAttribute(59, "value", global::Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line (41,54)-(41,83) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
registerModel.ConfirmPassword

#line default
#line hidden
#nullable disable
                ));
                __builder2.AddAttribute(60, "onchange", global::Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => registerModel.ConfirmPassword = __value, registerModel.ConfirmPassword));
                __builder2.SetUpdatesAttributeName("value");
                __builder2.CloseElement();
                __builder2.CloseElement();
                __builder2.AddMarkupContent(61, "\r\n\r\n\r\n            ");
                __builder2.AddMarkupContent(62, "<button type=\"submit\" class=\"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg\">Sign\r\n                Up</button>\r\n            ");
                __builder2.OpenElement(63, "p");
                __builder2.AddAttribute(64, "class", "text-xs text-red-500 mt-3");
#nullable restore
#line (49,51)-(49,63) 26 "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
__builder2.AddContent(65, errorMessage

#line default
#line hidden
#nullable disable
                );
                __builder2.CloseElement();
                __builder2.CloseElement();
                __builder2.CloseElement();
            }
            ));
            __builder.CloseComponent();
        }
        #pragma warning restore 1998
#nullable restore
#line (55,8)-(77,1) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"


    private RegisterModel registerModel = new RegisterModel();
    private string errorMessage = "";

    [CascadingParameter] public Task<AuthenticationState> authStateTask { get; set; }

    protected override async Task OnInitializedAsync()
    {
        var user = (await authStateTask).User;
        if (user.Identity.IsAuthenticated)
            nav.NavigateTo("/");
    }

    private async Task OnValidSignUp()
    {
        var result = await userAPIConsumer.Register(registerModel);
        if (result.IsSuccessful)
            nav.NavigateTo("SignIn");
        else
            errorMessage = result.Message;
    }

#line default
#line hidden
#nullable disable

        [global::Microsoft.AspNetCore.Components.InjectAttribute] private 
#nullable restore
#line (4,9)-(4,26) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
NavigationManager

#line default
#line hidden
#nullable disable
         
#nullable restore
#line (4,27)-(4,30) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
nav

#line default
#line hidden
#nullable disable
         { get; set; }
         = default!;
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private 
#nullable restore
#line (3,9)-(3,24) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
UserAPIConsumer

#line default
#line hidden
#nullable disable
         
#nullable restore
#line (3,25)-(3,40) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/SignUp.razor"
userAPIConsumer

#line default
#line hidden
#nullable disable
         { get; set; }
         = default!;
    }
}
#pragma warning restore 1591
