using MemberCenter.Application.Models.Admin;

namespace MemberCenter.Web.Areas.Admin.Models;

public sealed class AccountsIndexViewModel
{
    public string? Search { get; set; }
    public string? StatusFilter { get; set; }
    public int Page { get; set; } = 1;
    public int PageSize { get; set; } = 20;
    public int TotalCount { get; set; }
    public int TotalPages => TotalCount == 0 ? 1 : (int)Math.Ceiling(TotalCount / (double)PageSize);
    public bool HasPreviousPage => Page > 1;
    public bool HasNextPage => Page < TotalPages;
    public bool CanManage { get; set; }
    public bool OperatorIsSuperuser { get; set; }
    public IReadOnlyList<UserGovernanceSummaryDto> Items { get; set; } = Array.Empty<UserGovernanceSummaryDto>();
    public IReadOnlyList<EmailBlacklistDto> BlacklistItems { get; set; } = Array.Empty<EmailBlacklistDto>();
}
