namespace NeonSprawl.Server.Game.Skills;

/// <summary>Result of <see cref="SkillProgressionGrantOperations.TryApplyGrant"/> (NEO-38 / NEO-41 shared path).</summary>
public enum SkillProgressionGrantApplyKind
{
    /// <summary>Structured deny — <see cref="SkillProgressionGrantApplyOutcome.Response"/> is populated.</summary>
    Denied,

    /// <summary><see cref="IPlayerSkillProgressionStore.TryApplyXpDelta"/> returned false (e.g. player missing from progression store).</summary>
    ProgressionStoreMissing,

    /// <summary>XP applied — <see cref="SkillProgressionGrantApplyOutcome.Response"/> is success envelope.</summary>
    Granted,
}

/// <param name="Response">Deny or success JSON envelope; null only when <see cref="Kind"/> is <see cref="SkillProgressionGrantApplyKind.ProgressionStoreMissing"/>.</param>
public readonly record struct SkillProgressionGrantApplyOutcome(
    SkillProgressionGrantApplyKind Kind,
    SkillProgressionGrantResponse? Response);
