using System;
using Intrepid.Localization;
using Intrepid.Structures;
using Intrepid.Utilities;
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 ILocalization ActionLocalization { get; set; }
        public ILocalization DescriptionLocalization { get; set; }
        public Parameter[] DescriptionParams { get; set; }
        public Func<ActionIdentifier, bool> Callback { get; set; } = actionInfo =>
        {
            Dbg.Normal.Log("Callback - Action Fired: {0}", actionInfo.Id);
            return false;
        };

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