using MemberCenter.Application.Models.Admin;

namespace MemberCenter.Web.Areas.Admin.Models;

public sealed class NewsletterListDetailViewModel
{
    public required NewsletterListDto NewsletterList { get; set; }

    public string Tab { get; set; } = "subscribers";

    public int ActiveSubscriptionCount { get; set; }

    public int UnsubscribedCount { get; set; }

    public IReadOnlyList<NewsletterSubscriberRowViewModel> Rows { get; set; } = Array.Empty<NewsletterSubscriberRowViewModel>();
}

public sealed class NewsletterListIndexRowViewModel
{
    public required NewsletterListDto NewsletterList { get; set; }

    public int ActiveSubscriptionCount { get; set; }
}

public sealed class NewsletterSubscriberRowViewModel
{
    public Guid Id { get; set; }

    public string Email { get; set; } = string.Empty;

    public string ListId { get; set; } = string.Empty;

    public string Status { get; set; } = string.Empty;

    public DateTimeOffset CreatedAt { get; set; }

    public string? Reason { get; set; }
}
