@page "/wallet"

@using HyperCube.Models;
@using Microsoft.AspNetCore.Identity;
@inject AuthenticationStateProvider AuthenticationStateProvider
@inject UserManager<IdentityUser> UserManager

@attribute [Authorize]

<div class="tabs__content">
    <div class="tabs__controls">
        @if (account.Roles.Contains(Role.Admin) || account.Roles.Contains(Role.Initiator))
        {
            <a href="DocEdit" class="tabs__btn">Загрузка материалов</a>
        }
        @if (account.Roles.Contains(Role.Admin) || account.Roles.Contains(Role.Verifier))
        {
            <a href="Verifying" class="tabs__btn">Верификация</a>
        }
        <a class="tabs__btn">Библиотеки</a>
        @if (account.Roles.Contains(Role.Admin) || account.Roles.Contains(Role.Requester))
        {
            <a class="tabs__btn">Заказы</a>
        }
    </div>
    <div class="upload">
        <h2 class="upload__title">Кошелек</h2>
    </div>
    <table class="table-bordered" cellspacing="5" cellpadding="5">
        <tbody>
            <tr>
                <td>UUID:</td>
                <td>@account.UUID</td>
            </tr>
            <tr>
                <td>Name:</td>
                <td>@account.Name</td>
            </tr>
            <tr>
                <td>Email:</td>
                <td>@account.Email</td>
            </tr>
            <tr>
                <td>ETH Address:</td>
                <td>@address)</td>
            </tr>
            <tr>
                <td>Balance:</td>
                <td>@myBalance WEI</td>
            </tr>
            <tr>
                <td>Администратор:</td>
                <td><input @bind="admin"  type="checkbox" name="admin" /></td>
            </tr>
            <tr>
                <td>Инициатор:</td>
                <td><input @bind="initiator" type="checkbox" name="init" /></td>
            </tr>
            <tr>
                <td>Заказчик:</td>
                <td><input @bind="verifier" type="checkbox" name="request" /></td>
            </tr>
            <tr>
                <td>Верификатор:</td>
                <td><input @bind="requester" type="checkbox" name="vaerify" /></td>
            </tr>
            @*<p>
                @foreach (var role in account.Roles)
                    @role
                <br />
                @admin
            </p>*@
        </tbody>
    </table>
</div>
