using System;
using Intrepid.Diagnostics;
using Intrepid.Localization;
using Intrepid.Structures;
using Sirenix.OdinInspector;

namespace Intrepid.Gameplay.Entities.Player.ActionBelt
{
    [Serializable, DisplayAsString]
    public class ActionEnvelope
    {
        public ActionIdentifier ActionIdentifier { get; set; } = new();
        public bool CanBeDropped { get; set; }
        public ActionCategory ActionCategory { get; set; } = ActionCategory.General;
        public ActionActivationMode ActivationMode { get; set; } = ActionActivationMode.Instant;
        public float HoldDuration { get; set; }
        public ILocalization ActionLocalization { get; set; }
        public ILocalization DescriptionLocalization { get; set; }
        public Parameter[] DescriptionParams { get; set; }
        public Func<ActionIdentifier, bool> Callback { get; set; } = actionInfo =>
        {
            DLogger.LogDebug("Callback - Action Fired: {0}", actionInfo.Id);
            return false;
        };


        public override string ToString()
        {
            return $"Id: {ActionIdentifier.Id}, Category: {ActionCategory}";
        }
    }
}