using Sirenix.OdinInspector;
using UnityEngine.Events;
using VOID.Generic.Objects.Abstract.Events;
using VOID.Generic.Objects.Unit.Events;

namespace VOID.Generic.Objects.Abstract
{
    [System.Serializable]
    public class AbstractObjectEvents : ObjectComponent<AbstractObject>
    {
        [Title("Spawn")]
        public UnityEvent onSpawn;
        
        [Title("Destroy")]
        public UnityEvent<RemoveEvent> onRemove;
        
        [Title("Time")]
        public UnityEvent onFixedUpdate;
        
        // COMPONENT RELATED EVENTS
        [Title("Statuses")]
        public UnityEvent<StatusEvent> onStatusStart;
        public UnityEvent<StatusEvent> onStatusEnd;
        public UnityEvent<EffectEvent> onEffectStart;
        public UnityEvent<EffectEvent> onEffectEnd;
        [Title("Data")]
        public UnityEvent<BasicResourceChangeEvent> onMaxResourceChange;
        public UnityEvent<BasicResourceChangeEvent> onCurrentResourceChange;
        
        // TURN RELATED EVENTS
        // These should be ran only from `VOID.Generic.Turn.TurnManager`
        // So all `Invoke()` related to turns will be inside that manager class
        [Title("Turn")]
        public UnityEvent<TurnEvent> onTurnQueueStart;
        public UnityEvent<TurnEvent> onTurnQueueEnd;
        public UnityEvent<TurnEvent> onTurnQueueSwap;
        public UnityEvent<TurnEvent> onTurnQueueEnter;
        public UnityEvent<TurnEvent> onTurnQueueLeave;
        public UnityEvent<TurnEvent> onTurnSelfStart;
        public UnityEvent<TurnEvent> onTurnSelfEnd;
        
        // ACTION RELATED EVENTS
        [Title("Death")]
        public UnityEvent<DeathEvent> onDeathBefore;
        public UnityEvent<DeathEvent> onDeathAfter;
        [Title("Death")]
        public UnityEvent<ReviveEvent> onRevive;
        [Title("Being attacked")]
        public UnityEvent<DamageEvent> onDamagedBefore;
        public UnityEvent<DamageEvent> onDamagedAfter;
        [Title("Being hit by ability")]
        public UnityEvent<AbilityHitEvent> onAbilityHitBefore;
        public UnityEvent<AbilityHitEvent> onAbilityHitAfter;
        [Title("Being inspected")]
        public UnityEvent onInspectedBefore;
        public UnityEvent onInspectedAfter;
        
        // PHYSICS RELATED EVENTS
        [Title("TRIGGER ENTER & LEAVE")]
        public UnityEvent<TriggerEvent> onTriggerEnter;
        public UnityEvent<TriggerEvent> onTriggerExit;
    }
}