@inherits ComponentBase

<BaseContainer Title="@_title" Breadcrumbs="@_breadcrumbs" LoadData="LoadDataAsync">
    <Content>
        <MudGrid>
            <MudItem xs="12" sm="6" md="6" lg="3">
                <KeyValueCard T="string" Key="E-Mail" Value="@_model?.Email" Icon="@Icons.Material.Outlined.Email" />
            </MudItem>
            <MudItem xs="12" sm="6" md="6" lg="3">
                <KeyValueCard T="string" Key="Username" Value="@_model?.Username" Icon="@Icons.Material.Outlined.Person" />
            </MudItem>
            <MudItem xs="12" sm="6" md="6" lg="3">
                @{
                    var roleCount = _model.Roles?.Count() ?? 0;

                    <KeyValueCard T="int" Key="Roles" Value="@roleCount" Icon="@Icons.Material.Outlined.GroupAdd" />
                }
            </MudItem>
            <MudItem xs="12" sm="6" md="6" lg="3">
                @{
                    var value = "-";
                    var color = Color.Inherit;

                    if (_model?.TwoFactorEnabled is not null)
                    {
                        value = _model.TwoFactorEnabled ? "Enabled" : "Disabled";
                        color = _model.TwoFactorEnabled ? Color.Success : Color.Error;
                    }

                    <KeyValueCard T="string" Key="2FA" Value="@value" Icon="@Icons.Material.Outlined.SecurityUpdateGood" ValueColor="@color" />
                }
            </MudItem>
        </MudGrid>
    </Content>
</BaseContainer>