using Managing.Domain.Statistics;
using MediatR;
using static Managing.Common.Enums;

namespace Managing.Application.ManageBot.Commands
{
    /// <summary>
    /// Command to retrieve paginated agent summaries with sorting and filtering
    /// </summary>
    public class GetPaginatedAgentSummariesCommand : IRequest<(IEnumerable<AgentSummary> Results, int TotalCount)>
    {
        /// <summary>
        /// Page number (1-based)
        /// </summary>
        public int Page { get; }

        /// <summary>
        /// Number of items per page
        /// </summary>
        public int PageSize { get; }

        /// <summary>
        /// Field to sort by
        /// </summary>
        public SortableFields SortBy { get; }

        /// <summary>
        /// Sort order (asc or desc)
        /// </summary>
        public string SortOrder { get; }

        /// <summary>
        /// Optional list of agent names to filter by
        /// </summary>
        public IEnumerable<string>? AgentNames { get; }

        public GetPaginatedAgentSummariesCommand(
            int page = 1,
            int pageSize = 10,
            SortableFields sortBy = SortableFields.TotalPnL,
            string sortOrder = "desc",
            IEnumerable<string>? agentNames = null)
        {
            Page = page;
            PageSize = pageSize;
            SortBy = sortBy;
            SortOrder = sortOrder;
            AgentNames = agentNames;
        }
    }
} 