#pragma checksum "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0b4414799fdd19e118521e0f482a33d3a8a7db8988b936ee2a0af480802baacb"
// <auto-generated/>
#pragma warning disable 1591
namespace AuthModule.Components.Pages.Auths.ChangeEmail
{
    #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 (1,9)-(1,20) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"
EmptyLayout

#line default
#line hidden
#nullable disable
    ))]
    #nullable restore
    public partial class TypeUserAndPass : 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 In");
            }
            ));
            __builder.CloseComponent();
            __builder.AddMarkupContent(3, "\n\n\n\n\n");
            __builder.OpenComponent<global::Microsoft.AspNetCore.Components.Forms.EditForm>(4);
            __builder.AddComponentParameter(5, nameof(global::Microsoft.AspNetCore.Components.Forms.EditForm.
#nullable restore
#line (11,11)-(11,16) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"
Model

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

#line default
#line hidden
#nullable disable
            ));
            __builder.AddComponentParameter(6, nameof(global::Microsoft.AspNetCore.Components.Forms.EditForm.
#nullable restore
#line (11,38)-(11,51) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.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 (11,54)-(11,67) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"
OnValidSignIn

#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, "\n    ");
                __builder2.OpenComponent<global::Microsoft.AspNetCore.Components.Forms.ValidationSummary>(11);
                __builder2.CloseComponent();
                __builder2.AddMarkupContent(12, "\n    ");
                __builder2.OpenElement(13, "div");
                __builder2.AddAttribute(14, "class", "container px-5 py-24 mx-auto flex flex-wrap items-center");
                __builder2.AddMarkupContent(15, @"<div class=""lg:w-3/5 md:w-1/2 md:pr-16 lg:pr-0 pr-0""><h1 class=""title-font font-medium text-3xl text-gray-900"">Slow-carb next level shoindcgoitch ethical
                authentic, poko scenester</h1>
            <p class=""leading-relaxed mt-4"">Poke slow-carb mixtape knausgaard, typewriter street art gentrify hammock
                starladder roathse. Craies vegan tousled etsy austin.</p></div>
        ");
                __builder2.OpenElement(16, "div");
                __builder2.AddAttribute(17, "class", "lg:w-2/6 md:w-1/2 bg-gray-100 rounded-lg p-8 flex flex-col md:ml-auto w-full mt-10 md:mt-0");
                __builder2.AddMarkupContent(18, "<h2 class=\"text-gray-900 text-lg font-medium title-font mb-5\">Sign In</h2>\n\n            ");
                __builder2.OpenElement(19, "div");
                __builder2.AddAttribute(20, "class", "relative mb-4");
                __builder2.AddMarkupContent(21, "<label for=\"email\" class=\"leading-7 text-sm text-gray-600\">Email</label>\n                ");
                __builder2.OpenComponent<global::Microsoft.AspNetCore.Components.Forms.InputText>(22);
                __builder2.AddComponentParameter(23, "type", "email");
                __builder2.AddComponentParameter(24, "placeholder", "Email");
                __builder2.AddComponentParameter(25, "id", "email");
                __builder2.AddComponentParameter(26, "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.AddComponentParameter(27, nameof(global::Microsoft.AspNetCore.Components.Forms.InputText.
#nullable restore
#line (26,67)-(26,72) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"
Value

#line default
#line hidden
#nullable disable
                ), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.String>(
#nullable restore
#line (26,74)-(26,97) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"
tokenRequestModel.Email

#line default
#line hidden
#nullable disable
                ));
                __builder2.AddComponentParameter(28, nameof(global::Microsoft.AspNetCore.Components.Forms.InputText.ValueChanged), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Microsoft.AspNetCore.Components.EventCallback<global::System.String>>(global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::System.String>(this, global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => tokenRequestModel.Email = __value, tokenRequestModel.Email))));
                __builder2.AddComponentParameter(29, nameof(global::Microsoft.AspNetCore.Components.Forms.InputText.ValueExpression), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Linq.Expressions.Expression<global::System.Func<global::System.String>>>(() => tokenRequestModel.Email));
                __builder2.CloseComponent();
                __builder2.CloseElement();
                __builder2.AddMarkupContent(30, "\n            ");
                __builder2.OpenElement(31, "div");
                __builder2.AddAttribute(32, "class", "relative mb-4");
                __builder2.AddMarkupContent(33, "<label for=\"Password\" class=\"leading-7 text-sm text-gray-600\">Password</label>\n                ");
                __builder2.OpenComponent<global::Microsoft.AspNetCore.Components.Forms.InputText>(34);
                __builder2.AddComponentParameter(35, "type", "password");
                __builder2.AddComponentParameter(36, "placeholder", "Password");
                __builder2.AddComponentParameter(37, "id", "Password");
                __builder2.AddComponentParameter(38, "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.AddComponentParameter(39, nameof(global::Microsoft.AspNetCore.Components.Forms.InputText.
#nullable restore
#line (31,73)-(31,78) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"
Value

#line default
#line hidden
#nullable disable
                ), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.String>(
#nullable restore
#line (31,80)-(31,106) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"
tokenRequestModel.Password

#line default
#line hidden
#nullable disable
                ));
                __builder2.AddComponentParameter(40, nameof(global::Microsoft.AspNetCore.Components.Forms.InputText.ValueChanged), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Microsoft.AspNetCore.Components.EventCallback<global::System.String>>(global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::System.String>(this, global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => tokenRequestModel.Password = __value, tokenRequestModel.Password))));
                __builder2.AddComponentParameter(41, nameof(global::Microsoft.AspNetCore.Components.Forms.InputText.ValueExpression), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Linq.Expressions.Expression<global::System.Func<global::System.String>>>(() => tokenRequestModel.Password));
                __builder2.CloseComponent();
                __builder2.CloseElement();
                __builder2.AddMarkupContent(42, "\n\n            ");
                __builder2.AddMarkupContent(43, "<button type=\"submit\" class=\"text-white mt-4 bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg\">Sign\n                In</button>\n            ");
                __builder2.OpenElement(44, "p");
                __builder2.AddAttribute(45, "class", "text-xs text-red-500 mt-4");
#nullable restore
#line (38,51)-(38,63) 26 "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"
__builder2.AddContent(46, errorMessage

#line default
#line hidden
#nullable disable
                );
                __builder2.CloseElement();
                __builder2.CloseElement();
                __builder2.CloseElement();
            }
            ));
            __builder.CloseComponent();
            __builder.AddMarkupContent(47, "\n\n\n\n\n\n\n//Modal with confirm username and password ... calls a event call back that will carry on the request\n");
        }
        #pragma warning restore 1998
#nullable restore
#line (51,8)-(79,1) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangeEmail/TypeUserAndPass.razor"


    [Parameter]
    public EventCallback CarryOnRequest { get; set; }

    private TokenRequestModel tokenRequestModel = new();

    private string errorMessage = "";


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

    protected override async Task OnInitializedAsync()
    {
    }

    public async Task OnValidSignIn()
    {
        var isSuccessful = await userAPIConsumer.Login(tokenRequestModel);
        if (isSuccessful)
        {
            errorMessage = "Verifcation Email Sent to your Original Email.";
            userAPIConsumer.SendChangeEmailToken();
        }
        else
            errorMessage = "Wrong Email or Password.";
    }


#line default
#line hidden
#nullable disable

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

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

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

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

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