using MediatR;

namespace MissionService.API.Application.Commands;

/// <summary>
/// EN: Command to start a mission task
/// VI: Command bắt đầu một task mission
/// </summary>
public record StartMissionTaskCommand(Guid UserId, Guid MissionId) : IRequest<StartTaskResult>;

/// <summary>
/// EN: Result of starting a task
/// VI: Kết quả bắt đầu task
/// </summary>
public record StartTaskResult(
    bool Success,
    Guid? TaskId,
    string? Message);

/// <summary>
/// EN: Command to update task progress
/// VI: Command cập nhật tiến độ task
/// </summary>
public record UpdateTaskProgressCommand(
    Guid UserId,
    Guid TaskId,
    int CurrentValue,
    TaskEvidenceDto? Evidence = null) : IRequest<UpdateProgressResult>;

/// <summary>
/// EN: Task evidence DTO
/// VI: DTO bằng chứng task
/// </summary>
public record TaskEvidenceDto(
    string Type,
    string Data,
    string? ScreenshotUrl = null,
    string? VideoUrl = null);

/// <summary>
/// EN: Result of updating progress
/// VI: Kết quả cập nhật tiến độ
/// </summary>
public record UpdateProgressResult(
    bool Success,
    int CurrentValue,
    int TargetValue,
    decimal PercentComplete,
    bool IsComplete,
    string? Message);

/// <summary>
/// EN: Command to claim task reward
/// VI: Command nhận thưởng task
/// </summary>
public record ClaimTaskRewardCommand(Guid UserId, Guid TaskId) : IRequest<ClaimRewardResult>;

/// <summary>
/// EN: Result of claiming reward
/// VI: Kết quả nhận thưởng
/// </summary>
public record ClaimRewardResult(
    bool Success,
    decimal? PointsEarned,
    string? Message);
