/*
 * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Alliance\LeadershipElectionResponseDto.cs
 * Created: 2025-10-22
 * Last Modified: 2025-10-22
 * Description: Response DTO for alliance leadership election results and status
 * Last Edit Notes: Initial creation following established Alliance DTO patterns
 */

namespace ShadowedRealms.Shared.DTOs.Alliance
{
    /// <summary>
    /// Response DTO for alliance leadership election results and status
    /// </summary>
    public class LeadershipElectionResponseDto
    {
        /// <summary>
        /// Unique identifier for the election
        /// </summary>
        public int ElectionId { get; set; }

        /// <summary>
        /// Alliance conducting the election
        /// </summary>
        public int AllianceId { get; set; }

        /// <summary>
        /// Position being elected (Leader, Officer, Diplomat, etc.)
        /// </summary>
        public string Position { get; set; } = string.Empty;

        /// <summary>
        /// Current elected leader (if election completed)
        /// </summary>
        public int? ElectedPlayerId { get; set; }

        /// <summary>
        /// Name of the elected player
        /// </summary>
        public string? ElectedPlayerName { get; set; }

        /// <summary>
        /// Candidates in the election
        /// </summary>
        public List<Dictionary<string, object>> Candidates { get; set; } = new();

        /// <summary>
        /// Current vote tallies
        /// </summary>
        public Dictionary<string, int> VoteTallies { get; set; } = new();

        /// <summary>
        /// Members who have voted
        /// </summary>
        public List<Dictionary<string, object>> VotingMembers { get; set; } = new();

        /// <summary>
        /// Total eligible voters
        /// </summary>
        public int EligibleVoters { get; set; }

        /// <summary>
        /// Votes cast so far
        /// </summary>
        public int VotesCast { get; set; }

        /// <summary>
        /// Voting participation percentage
        /// </summary>
        public decimal ParticipationPercentage { get; set; }

        /// <summary>
        /// Time remaining for voting
        /// </summary>
        public TimeSpan? VotingTimeRemaining { get; set; }

        /// <summary>
        /// Election status (Nominating, Voting, Completed, Contested, Cancelled)
        /// </summary>
        public string ElectionStatus { get; set; } = string.Empty;

        /// <summary>
        /// Election rules and requirements
        /// </summary>
        public Dictionary<string, object> ElectionRules { get; set; } = new();

        /// <summary>
        /// When the election started
        /// </summary>
        public DateTime ElectionStarted { get; set; }

        /// <summary>
        /// When this election information was last updated
        /// </summary>
        public DateTime LastUpdated { get; set; } = DateTime.UtcNow;
    }
}