#pragma checksum "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor" "{8829d00f-11b8-4213-878b-770e8597ac16}" "db47bb5e8df44db1a9713065fec97c2bd6743405b96eb6584d86497c2ae8b9b9"
// <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.RouteAttribute(
    // language=Route,Component
#nullable restore
#line (1,7)-(1,25) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
"/user/basic-info"

#line default
#line hidden
#nullable disable
    )]
    #nullable restore
    public partial class BasicInfo : 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, "Dialog");
            __builder.AddAttribute(1, "ShowDialog", "showNameDialog");
            __builder.AddAttribute(2, "OnCancel", "ToggleNameDialog");
            __builder.AddAttribute(3, "OnSubmit", "ChangeName");
            __builder.AddAttribute(4, "TitleName", 
#nullable restore
#line (5,100)-(5,113) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
"Change Name"

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(5, "<div>\n        TEST TEST TEST\n    </div>");
            __builder.CloseElement();
            __builder.AddMarkupContent(6, "\n\n\n");
            __builder.OpenElement(7, "div");
            __builder.AddAttribute(8, "class", "grid  grid-cols-1 md:grid-cols-2 p-20");
            __builder.OpenElement(9, "div");
            __builder.AddAttribute(10, "class", "flex flex-row justify-between");
            __builder.AddMarkupContent(11, "<label>Name:</label>\n        ");
            __builder.OpenElement(12, "p");
#nullable restore
#line (30,13)-(30,22) 25 "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
__builder.AddContent(13, user.Name

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(14, "\n        ");
            __builder.OpenElement(15, "button");
            __builder.AddAttribute(16, "onclick", global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line (31,27)-(31,43) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
ToggleNameDialog

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(17, "class", "btn btn-primary");
            __builder.AddContent(18, "Change");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(19, "\n\n\n    ");
            __builder.OpenElement(20, "div");
            __builder.AddAttribute(21, "class", "flex flex-row justify-between");
            __builder.AddMarkupContent(22, "<label>Email:</label>\n        ");
            __builder.OpenElement(23, "p");
#nullable restore
#line (37,13)-(37,23) 25 "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
__builder.AddContent(24, user.Email

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(25, "\n        ");
            __builder.OpenElement(26, "button");
            __builder.AddAttribute(27, "onclick", global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line (38,27)-(38,44) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
ToggleEmailDialog

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(28, "class", "btn btn-primary");
            __builder.AddContent(29, "Change");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(30, "\n\n\n    ");
            __builder.OpenElement(31, "div");
            __builder.AddAttribute(32, "class", "flex flex-row justify-between");
            __builder.AddMarkupContent(33, "<label>PhoneNumber:</label>\n        ");
            __builder.OpenElement(34, "p");
#nullable restore
#line (44,13)-(44,29) 25 "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
__builder.AddContent(35, user.PhoneNumber

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(36, "\n        ");
            __builder.OpenElement(37, "button");
            __builder.AddAttribute(38, "onclick", global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line (45,27)-(45,50) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
TogglePhoneNumberDialog

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(39, "class", "btn btn-primary");
            __builder.AddContent(40, "Change");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(41, "\n\n\n    ");
            __builder.OpenElement(42, "div");
            __builder.AddAttribute(43, "class", "flex flex-row justify-between");
            __builder.AddMarkupContent(44, "<label>Password:</label>\n        ");
            __builder.AddMarkupContent(45, "<p>***********</p>\n        ");
            __builder.OpenElement(46, "button");
            __builder.AddAttribute(47, "onclick", global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line (52,27)-(52,47) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"
TogglePasswordDialog

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(48, "class", "btn btn-primary");
            __builder.AddContent(49, "Change");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.CloseElement();
        }
        #pragma warning restore 1998
#nullable restore
#line (58,8)-(113,1) "/run/media/yla/Dataa/Work/Programming/AllProjects/MainProgram/UI/Libs/Modules/AuthModule/Components/Pages/Auths/BasicInfo.razor"


    UserVM user = new();

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

    bool showNameDialog = false;
    bool showEmailDialog = false;
    bool showPhoneNumberDialog = false;
    bool showPasswordDialog = false;


    protected override async Task OnInitializedAsync()
    {

        var userId = (await authStateTask).User.Claims.FirstOrDefault(x => x.Type == "id").Value;
        if (userId == null)
            nav.NavigateTo("/signin");

        user = await userAPIConsumer.GetUser(userId);
    }

    void ToggleNameDialog() => showNameDialog = !showNameDialog;

    void ToggleEmailDialog() => showEmailDialog = !showEmailDialog;

    void TogglePhoneNumberDialog() => showPhoneNumberDialog = !showPhoneNumberDialog;

    void TogglePasswordDialog() => showPasswordDialog = !showPasswordDialog;

    async Task ChangeName()
    {

        ToggleNameDialog();
    }

    async Task ChangeEmail()
    {

        ToggleEmailDialog();
    }

    async Task ChangePhoneNumber()
    {

        TogglePhoneNumberDialog();
    }

    async Task ChangePassword()
    {

        TogglePasswordDialog();
    }



#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/BasicInfo.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/BasicInfo.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/BasicInfo.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/BasicInfo.razor"
userAPIConsumer

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