#pragma checksum "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangePassword/ForgotPassword.razor" "{8829d00f-11b8-4213-878b-770e8597ac16}" "b14fadc825ed5a3830ac1ba6e0544d0c2d1ae23bc2d8a0e9a8f903da03c8960d"
// <auto-generated/>
#pragma warning disable 1591
namespace AuthModule.Components.Pages.Auths.ChangePassword
{
    #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
    ;
#nullable restore
#line (2,2)-(2,45) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangePassword/ForgotPassword.razor"
using System.ComponentModel.DataAnnotations

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

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

#line default
#line hidden
#nullable disable
    )]
    #nullable restore
    public partial class ForgotPassword : global::Microsoft.AspNetCore.Components.ComponentBase
    #nullable disable
    {
        #pragma warning disable 1998
        protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "div");
            __builder.AddAttribute(1, "class", "container px-5 py-24 mx-auto flex flex-wrap items-center");
            __builder.OpenElement(2, "div");
            __builder.AddAttribute(3, "class", "lg:w-2/6 md:w-1/2 bg-gray-100 rounded-lg p-8 flex flex-col mx-auto w-full mt-10 md:mt-0");
            __builder.AddMarkupContent(4, "<h2 class=\"text-gray-900 text-lg font-medium title-font mb-5\">Reset your Password</h2>\n\n\n        ");
            __builder.OpenElement(5, "div");
            __builder.AddAttribute(6, "class", "relative mb-4");
            __builder.AddMarkupContent(7, "<label for=\"email\" class=\"leading-7 text-sm text-gray-600\">Email</label>\n            ");
            __builder.OpenElement(8, "input");
            __builder.AddAttribute(9, "type", "email");
            __builder.AddAttribute(10, "placeholder", "Email");
            __builder.AddAttribute(11, "id", "email");
            __builder.AddAttribute(12, "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");
            __builder.AddAttribute(13, "value", global::Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line (14,60)-(14,65) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangePassword/ForgotPassword.razor"
Email

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(14, "onchange", global::Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Email = __value, Email));
            __builder.SetUpdatesAttributeName("value");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(15, "\n\n\n        ");
            __builder.OpenElement(16, "button");
            __builder.AddAttribute(17, "onclick", global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line (20,27)-(20,40) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangePassword/ForgotPassword.razor"
ResetPassword

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(18, "type", "button");
            __builder.AddAttribute(19, "class", "text-white mt-4 bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg");
            __builder.AddMarkupContent(20, "Reset\n            Password");
            __builder.CloseElement();
            __builder.AddMarkupContent(21, "\n        ");
            __builder.OpenElement(22, "p");
            __builder.AddAttribute(23, "class", "text-md" + " text-center" + " font-bold" + " " + (
#nullable restore
#line (23,51)-(23,99) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangePassword/ForgotPassword.razor"
isSuccessful ? "text-green-500" : "text-red-500"

#line default
#line hidden
#nullable disable
            ) + " mt-4");
#nullable restore
#line (23,108)-(23,121) 25 "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/ChangePassword/ForgotPassword.razor"
__builder.AddContent(24, resultMessage

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


    string resultMessage = "";
    bool isSuccessful = false;


    public string Email { get; set; }

    async Task ResetPassword()
    {
        isSuccessful = await userAPIConsumer.RequestResetPassword(Email);
        if (isSuccessful)
            resultMessage = "Email Sent.";
        else
            resultMessage = "Error.";
    }


#line default
#line hidden
#nullable disable

        [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/ChangePassword/ForgotPassword.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/ChangePassword/ForgotPassword.razor"
userAPIConsumer

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