using System;

namespace SpecialMoveCards
{
    /// <summary>
    /// Central event hub for the Special Move Card system.
    /// Keeps the PlayerPocket decoupled from UI and other systems.
    /// </summary>
    public static class GameEvents
    {
        /// <summary>Raised when a card is picked up by a player.</summary>
        public static event Action<CardData> CardPicked;
        /// <summary>Raised when a card is consumed/used by the player.</summary>
        public static event Action<CardData, int> CardUsed; // Card, slotIndex
        /// <summary>Raised whenever the pocket inventory changes.</summary>
        public static event Action<CardData[], int> PocketChanged; // snapshot, count

        public static void RaiseCardPicked(CardData data) => CardPicked?.Invoke(data);
        public static void RaiseCardUsed(CardData data, int slotIndex) => CardUsed?.Invoke(data, slotIndex);
        public static void RaisePocketChanged(CardData[] snapshot, int count) => PocketChanged?.Invoke(snapshot, count);
    }
}
